fix: get profile user/staff using token rather than id

This commit is contained in:
ericprd
2025-02-28 12:18:47 +08:00
parent 5fb0764630
commit 6b858b99fb
15 changed files with 234 additions and 44 deletions
+6 -1
View File
@@ -48,7 +48,12 @@ func (a *AuthSvc) RegisterUser(spec authdomain.RegisterUserReq) (string, error)
return "", errors.New(err.Error())
}
token, err := utils.GenerateToken(spec.Email)
authToken := authdomain.AuthToken{
Email: user.Email,
SessionID: uuid.NewString(),
}
token, err := utils.GenerateToken(authToken)
if err != nil {
return "", errors.New(err.Error())
}