feat: do not access database before response return (close #158)
This commit is contained in:
1 parent
6c579a6053
commit
02bc73066c
3 files changed
+56
-5
No files matched your search
+1
-1
@@ -100,7 +100,7 @@ func TokenAuth() func(c *gin.Context) {
|
||||
c.Abort()
|
||||
return
|
||||
}
|
||||
if !model.IsUserEnabled(token.UserId) {
|
||||
if !model.CacheIsUserEnabled(token.UserId) {
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"error": gin.H{
|
||||
"message": "用户已被封禁",
|
||||
|
||||
Reference in new issue
Block a user