avoid c.Next() and c.Abort() both being executed

This commit is contained in:
Brad Rydzewski 2016-11-21 16:17:42 +01:00 committed by GitHub
parent 9264105414
commit 1dbf782356

View file

@ -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()
}
}