Unifies the output of the routing layer and the isolated response structure

This commit is contained in:
Granty1
2020-04-08 14:00:08 +08:00
parent 5d222585dd
commit 4277505c6a
24 changed files with 250 additions and 121 deletions
+2 -2
View File
@@ -22,8 +22,8 @@ func JsonInBlacklist(c *gin.Context) {
}
err := service.JsonInBlacklist(modelJwt)
if err != nil {
response.Result(response.ERROR, gin.H{}, fmt.Sprintf("jwt作废失败,%v", err), c)
response.FailWithMessage(fmt.Sprintf("jwt作废失败,%v", err), c)
} else {
response.Result(response.SUCCESS, gin.H{}, "jwt作废成功", c)
response.OkWithMessage("jwt作废成功", c)
}
}