Skip to content

Commit

Permalink
Merge pull request #44 from NJUPT-SAST/dev-windpo
Browse files Browse the repository at this point in the history
fix: Modify the type of returned Token name
  • Loading branch information
windpo authored Sep 24, 2023
2 parents 3df4bd0 + 3f425a7 commit d670380
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/v1/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ func Login(ctx *gin.Context) {
}
model.Rdb.Set(ctx, model.LoginTokenKey(username), token, model.LOGIN_TOKEN_EXP)
ctx.JSON(http.StatusOK, result.Success(gin.H{
"token": token,
model.LOGIN_TOKEN_SUB: token,
}))
}

Expand Down
2 changes: 1 addition & 1 deletion service/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func VerifyAccountResetPWD(ctx *gin.Context, username string) (string, error) {

//user exist and try to reset password
if exist {
ticket, err := util.GenerateTokenWithExp(model.ResetPwdJWTSubkey(username), model.RESETPWD_TICKET_EXP)
ticket, err := util.GenerateTokenWithExp(ctx, model.ResetPwdJWTSubkey(username), model.RESETPWD_TICKET_EXP)
if err != nil {
return "", err
}
Expand Down

0 comments on commit d670380

Please sign in to comment.