This commit is contained in:
Sakurasan
2023-06-10 22:43:19 +08:00
parent bc39ce1ddd
commit abba845a71

View File

@@ -118,6 +118,11 @@ func AuthMiddleware() gin.HandlerFunc {
c.Abort()
return
}
if store.IsExistAuthCache(token[7:]) {
if strings.HasPrefix(c.Request.URL.Path, "/1/me") {
c.Next()
}
}
if token[7:] != rootToken {
u, err := store.GetUserByID(uint(1))
if err != nil {