File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -264,7 +264,7 @@ func (b *BaseApi) SetUserAuthority(c *gin.Context) {
264264 }
265265 c .Header ("new-token" , token )
266266 c .Header ("new-expires-at" , strconv .FormatInt (claims .ExpiresAt .Unix (), 10 ))
267- utils .SetToken (c , token , int (( claims .ExpiresAt .Unix ()- time .Now ().Unix ()) / 60 ))
267+ utils .SetToken (c , token , int (claims .ExpiresAt .Unix ()- time .Now ().Unix ()))
268268 response .OkWithMessage ("修改成功" , c )
269269}
270270
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ func GetToken(c *gin.Context) string {
4949 global .GVA_LOG .Error ("重新写入cookie token失败,未能成功解析token,请检查请求头是否存在x-token且claims是否为规定结构" )
5050 return token
5151 }
52- SetToken (c , token , int (( claims .ExpiresAt .Unix ()- time .Now ().Unix ()) / 60 ))
52+ SetToken (c , token , int (claims .ExpiresAt .Unix ()- time .Now ().Unix ()))
5353 }
5454 return token
5555}
You can’t perform that action at this time.
0 commit comments