fix: playground chat
This commit is contained in:
1 parent
31adc39353
commit
79522d7688
2 files changed
+14
-3
No files matched your search
@@ -123,6 +123,18 @@ func authHelper(c *gin.Context, minRole int) {
|
||||
c.Set("id", id)
|
||||
c.Set("group", session.Get("group"))
|
||||
c.Set("use_access_token", useAccessToken)
|
||||
|
||||
userCache, err := model.GetUserCache(id.(int))
|
||||
if err != nil {
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"success": false,
|
||||
"message": err.Error(),
|
||||
})
|
||||
c.Abort()
|
||||
return
|
||||
}
|
||||
userCache.WriteContext(c)
|
||||
|
||||
c.Next()
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user