mirror of
https://github.com/songquanpeng/message-pusher.git
synced 2025-10-05 08:06:51 +08:00
chore: update token related logic
This commit is contained in:
@@ -16,7 +16,7 @@ func authHelper(c *gin.Context, minRole int) {
|
||||
if username == nil {
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"success": false,
|
||||
"message": "无权进行此操作,未登录或 token 无效",
|
||||
"message": "无权进行此操作,用户未登录",
|
||||
})
|
||||
c.Abort()
|
||||
return
|
||||
@@ -32,7 +32,7 @@ func authHelper(c *gin.Context, minRole int) {
|
||||
if role.(int) < minRole {
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"success": false,
|
||||
"message": "无权进行此操作,未登录或 token 无效,或没有权限",
|
||||
"message": "无权进行此操作,用户未登录或没有权限",
|
||||
})
|
||||
c.Abort()
|
||||
return
|
||||
|
Reference in New Issue
Block a user