Update project from local

This commit is contained in:
2026-07-06 09:36:50 +07:00
parent 0b1cd60738
commit d3c395e45f
2117 changed files with 5151241 additions and 1710497 deletions

View File

@@ -1,27 +1,27 @@
package auth
import (
"net/http"
echojwt "github.com/labstack/echo-jwt/v4"
"github.com/labstack/echo/v4"
)
var IsLoggedIn = echojwt.WithConfig(
echojwt.Config{
SigningKey: []byte("--one_api-secret-2019-04-01"),
TokenLookup: "cookie:token",
ErrorHandler: JWTErrorChecker,
},
)
var IsAlreadyLogin = echojwt.WithConfig(
echojwt.Config{
SigningKey: []byte("--one_api-secret-2019-04-01"),
ErrorHandler: JWTErrorChecker,
},
)
func JWTErrorChecker(c echo.Context, err error) error {
return c.Redirect(http.StatusTemporaryRedirect, "/login")
}
package auth
import (
"net/http"
echojwt "github.com/labstack/echo-jwt/v4"
"github.com/labstack/echo/v4"
)
var IsLoggedIn = echojwt.WithConfig(
echojwt.Config{
SigningKey: []byte("--one_api-secret-2019-04-01"),
TokenLookup: "cookie:token",
ErrorHandler: JWTErrorChecker,
},
)
var IsAlreadyLogin = echojwt.WithConfig(
echojwt.Config{
SigningKey: []byte("--one_api-secret-2019-04-01"),
ErrorHandler: JWTErrorChecker,
},
)
func JWTErrorChecker(c echo.Context, err error) error {
return c.Redirect(http.StatusTemporaryRedirect, "/login")
}