Fix stupid ai errors

Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
2026-01-21 14:58:23 +08:00
parent 96d76b3657
commit 2f26b2ddb5
9 changed files with 32 additions and 32 deletions

View File

@@ -18,7 +18,7 @@ func List(c *gin.Context) {
offset, ok := c.GetQuery("offset")
if !ok {
errorCode := new(exception.Builder).
SetStatus(exception.StatusClient).
SetStatus(exception.StatusUser).
SetService(exception.ServiceUser).
SetEndpoint(exception.EndpointUserServiceList).
SetType(exception.TypeCommon).
@@ -32,7 +32,7 @@ func List(c *gin.Context) {
limitNum, err := strconv.ParseInt(limit, 10, 64)
if err != nil {
errorCode := new(exception.Builder).
SetStatus(exception.StatusClient).
SetStatus(exception.StatusUser).
SetService(exception.ServiceUser).
SetEndpoint(exception.EndpointUserServiceList).
SetType(exception.TypeCommon).
@@ -45,7 +45,7 @@ func List(c *gin.Context) {
offsetNum, err := strconv.ParseInt(offset, 10, 64)
if err != nil {
errorCode := new(exception.Builder).
SetStatus(exception.StatusClient).
SetStatus(exception.StatusUser).
SetService(exception.ServiceUser).
SetEndpoint(exception.EndpointUserServiceList).
SetType(exception.TypeCommon).

View File

@@ -44,7 +44,7 @@ func Update(c *gin.Context) {
err = c.ShouldBindJSON(&ReqInfo)
if err != nil {
errorCode := new(exception.Builder).
SetStatus(exception.StatusClient).
SetStatus(exception.StatusUser).
SetService(exception.ServiceUser).
SetEndpoint(exception.EndpointUserServiceUpdate).
SetType(exception.TypeCommon).
@@ -82,7 +82,7 @@ func Update(c *gin.Context) {
if ReqInfo.Username != "" {
if len(ReqInfo.Username) < 5 || len(ReqInfo.Username) >= 255 {
errorCode := new(exception.Builder).
SetStatus(exception.StatusClient).
SetStatus(exception.StatusUser).
SetService(exception.ServiceUser).
SetEndpoint(exception.EndpointUserServiceUpdate).
SetType(exception.TypeCommon).
@@ -97,7 +97,7 @@ func Update(c *gin.Context) {
if ReqInfo.Nickname != "" {
if utf8.RuneCountInString(ReqInfo.Nickname) > 24 {
errorCode := new(exception.Builder).
SetStatus(exception.StatusClient).
SetStatus(exception.StatusUser).
SetService(exception.ServiceUser).
SetEndpoint(exception.EndpointUserServiceUpdate).
SetType(exception.TypeCommon).
@@ -112,7 +112,7 @@ func Update(c *gin.Context) {
if ReqInfo.Subtitle != "" {
if utf8.RuneCountInString(ReqInfo.Subtitle) > 32 {
errorCode := new(exception.Builder).
SetStatus(exception.StatusClient).
SetStatus(exception.StatusUser).
SetService(exception.ServiceUser).
SetEndpoint(exception.EndpointUserServiceUpdate).
SetType(exception.TypeCommon).
@@ -128,7 +128,7 @@ func Update(c *gin.Context) {
_, err := url.ParseRequestURI(ReqInfo.Avatar)
if err != nil {
errorCode := new(exception.Builder).
SetStatus(exception.StatusClient).
SetStatus(exception.StatusUser).
SetService(exception.ServiceUser).
SetEndpoint(exception.EndpointUserServiceUpdate).
SetType(exception.TypeCommon).
@@ -144,7 +144,7 @@ func Update(c *gin.Context) {
if ReqInfo.Bio != "" {
if !cryptography.IsBase64Std(ReqInfo.Bio) {
errorCode := new(exception.Builder).
SetStatus(exception.StatusClient).
SetStatus(exception.StatusUser).
SetService(exception.ServiceUser).
SetEndpoint(exception.EndpointUserServiceUpdate).
SetType(exception.TypeCommon).