avoid c.Next() and c.Abort() both being executed
This commit is contained in:
parent
9264105414
commit
1dbf782356
1 changed files with 3 additions and 3 deletions
|
@ -65,9 +65,9 @@ func MustTeamAdmin() gin.HandlerFunc {
|
|||
|
||||
if perm.Admin {
|
||||
c.Next()
|
||||
} else {
|
||||
c.String(401, "User not authorized")
|
||||
c.Abort()
|
||||
}
|
||||
|
||||
c.String(401, "User not authorized")
|
||||
c.Abort()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue