diff --git a/handler/session.go b/handler/session.go index fb2c634..f932e82 100644 --- a/handler/session.go +++ b/handler/session.go @@ -23,22 +23,6 @@ func ValidSession(next echo.HandlerFunc) echo.HandlerFunc { } } -func ProtectedHandler(next echo.HandlerFunc) echo.HandlerFunc { - return func(c echo.Context) error { - sess, err := session.Get("session", c) - if err != nil { - return err - } - - apiKey, ok := sess.Values["api_key"].(string) - if !ok || apiKey != util.ApiKey { - return echo.NewHTTPError(http.StatusUnauthorized, "Invalid API key") - } - // Handle the request for authenticated users - return next(c) - } -} - func isValidSession(c echo.Context) bool { if util.DisableLogin { return true