Fixed bug that can not create jwt black record

This commit is contained in:
Granty1
2020-04-08 19:37:38 +08:00
parent d198856633
commit a9651d1ce4
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ func JsonInBlacklist(c *gin.Context) {
modelJwt := model.JwtBlacklist{
Jwt: token,
}
err := service.JsonInBlacklist(modelJwt)
err := service.JsonInBlacklist(&modelJwt)
if err != nil {
response.FailWithMessage(fmt.Sprintf("jwt作废失败,%v", err), c)
} else {
+1 -1
View File
@@ -103,7 +103,7 @@ func tokenNext(c *gin.Context, user model.SysUser) {
} else {
var blackJWT model.JwtBlacklist
blackJWT.Jwt = jwtStr
err3 := service.JsonInBlacklist(blackJWT)
err3 := service.JsonInBlacklist(&blackJWT)
if err3 != nil {
response.FailWithMessage("jwt作废失败", c)
} else {