refactored out global. long live AppState

This commit is contained in:
ari melody 2025-01-21 14:53:18 +00:00
parent 3d674515ce
commit 384579ee5e
Signed by: ari
GPG key ID: CF99829C92678188
24 changed files with 350 additions and 375 deletions

View file

@ -1,7 +1,6 @@
package controller
import (
"arimelody-web/global"
"arimelody-web/model"
"errors"
"fmt"
@ -72,7 +71,7 @@ func GetTokenFromRequest(db *sqlx.DB, r *http.Request) string {
return tokenStr
}
cookie, err := r.Cookie(global.COOKIE_TOKEN)
cookie, err := r.Cookie(model.COOKIE_TOKEN)
if err != nil {
return ""
}