This commit is contained in:
eson
2023-08-28 18:38:34 +08:00
parent bc057ed73d
commit 39b652ce58
2 changed files with 7 additions and 9 deletions

View File

@@ -134,12 +134,11 @@ func GenerateJwtTokenUint64(AccessSecret uint64, accessExpire, nowSec int64, use
claims["exp"] = nowSec + accessExpire
claims["iat"] = nowSec
if userid == 0 && guestid == 0 {
err := errors.New("userid and guestid cannot be 0 at the same time")
logx.Error(err)
return "", err
}
// if userid == 0 && guestid == 0 {
// err := errors.New("userid and guestid cannot be 0 at the same time")
// logx.Error(err)
// return "", err
// }
claims["user_id"] = userid
claims["guest_id"] = guestid