feat: do not access database before response return (close #158)

This commit is contained in:
JustSong committed 2023-06-21 17:26:26 +08:00
1 parent 6c579a6053
commit 02bc73066c
3 files changed
+56 -5

No files matched your search

+1 -1
View File
@@ -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": "用户已被封禁",