refactor: 统一认证响应

This commit is contained in:
zetaloop
2026-04-03 17:46:08 +08:00
parent 3eb44d8a73
commit 5ff573f8fc
7 changed files with 22 additions and 51 deletions
@@ -23,12 +23,10 @@ func LoginHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
}
l := auth.NewLoginLogic(r.Context(), svcCtx)
resp, err := l.Login(&req)
resp, token, err := l.Login(&req)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
token := resp.RefreshToken
resp.RefreshToken = ""
http.SetCookie(w, &http.Cookie{
Name: "JToken",
Value: token,