diff --git a/internal/handler/public/user/deleteAccountHandler.go b/internal/handler/public/user/deleteAccountHandler.go index 63f9ab7..ca74212 100644 --- a/internal/handler/public/user/deleteAccountHandler.go +++ b/internal/handler/public/user/deleteAccountHandler.go @@ -7,6 +7,7 @@ import ( "github.com/gin-gonic/gin" "github.com/perfect-panel/server/internal/logic/public/user" "github.com/perfect-panel/server/internal/svc" + "github.com/perfect-panel/server/pkg/result" ) // DeleteAccountHandler 注销账号处理器 @@ -37,7 +38,8 @@ func DeleteAccountHandler(serverCtx *svc.ServiceContext) gin.HandlerFunc { c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()}) return } - c.JSON(http.StatusOK, resp) + result.HttpResult(c, resp, err) + } } diff --git a/internal/logic/public/user/deleteAccountLogic.go b/internal/logic/public/user/deleteAccountLogic.go index 5146276..6d7d080 100644 --- a/internal/logic/public/user/deleteAccountLogic.go +++ b/internal/logic/public/user/deleteAccountLogic.go @@ -109,6 +109,7 @@ func (l *DeleteAccountLogic) DeleteAccount() (resp *types.DeleteAccountResponse, resp.Message = "账户注销成功" resp.UserId = newUserId resp.Code = 200 + return resp, nil }