mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-10-14 22:44:07 +00:00
feat: do not access database before response return (close #158)
This commit is contained in:
@@ -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