🐛 fix session bug

This commit is contained in:
landaiqing
2024-11-17 20:02:59 +08:00
parent 34c4690f80
commit 78a162a19a
72 changed files with 1304 additions and 453 deletions

View File

@@ -3,7 +3,6 @@ package generate
import (
"context"
"encoding/json"
"errors"
"time"
"github.com/redis/go-redis/v9"
@@ -21,7 +20,7 @@ func GenerateRotateCaptcha(captcha rotate.Captcha, redis *redis.Client, ctx cont
}
blockData := captchaData.GetData()
if blockData == nil {
return nil, errors.New("captcha data is nil")
return nil, nil
}
masterImageBase64 := captchaData.GetMasterImage().ToBase64()
thumbImageBase64 := captchaData.GetThumbImage().ToBase64()

View File

@@ -3,7 +3,6 @@ package generate
import (
"context"
"encoding/json"
"errors"
"time"
"github.com/redis/go-redis/v9"
@@ -21,7 +20,7 @@ func GenerateSlideBasicCaptcha(slide slide.Captcha, redis *redis.Client, ctx con
}
blockData := captData.GetData()
if blockData == nil {
return nil, errors.New("block data is nil")
return nil, nil
}
var masterImageBase64, tileImageBase64 string
masterImageBase64 = captData.GetMasterImage().ToBase64()