This commit is contained in:
oneao committed 2025-11-11 22:31:33 +08:00
1 parent 7971c527af
commit b8a6b15355
27 files changed
+480 -399

No files matched your search

@@ -9,12 +9,8 @@ import (
func AuthMiddleware() router.HandlerFunc {
return func(c *router.Context) error {
fmt.Println("===请求进入===")
token := c.Header("token")
if token == "" {
fmt.Println("===未提供 Token===")
c.Abort()
return response.Fail(c).
Code(response.HttpCode.Unauthorized).
@@ -41,7 +37,6 @@ func AuthMiddleware() router.HandlerFunc {
Send()
}
fmt.Println("===请求通过===")
return c.Next()
}
}