forked from goffee/cup
migration
This commit is contained in:
parent
35d26e5868
commit
a756cd418d
6 changed files with 14 additions and 32 deletions
|
|
@ -1,4 +1,4 @@
|
|||
package middlewares
|
||||
package hooks
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
|
@ -11,7 +11,7 @@ import (
|
|||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
var AuthCheck core.Middleware = func(c *core.Context) {
|
||||
var AuthCheck core.Hook = func(c *core.Context) {
|
||||
tokenRaw := c.GetHeader("Authorization")
|
||||
token := strings.TrimSpace(strings.Replace(tokenRaw, "Bearer", "", 1))
|
||||
if token == "" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue