From 80581932ae496b0d4c209ba3c1016af4c9242c64 Mon Sep 17 00:00:00 2001 From: Bronek Szulc Date: Sat, 30 Nov 2024 15:06:41 -0500 Subject: [PATCH] temporarily block auth routes --- api/resource/auth/routes.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api/resource/auth/routes.go b/api/resource/auth/routes.go index 88847c4..721acbe 100644 --- a/api/resource/auth/routes.go +++ b/api/resource/auth/routes.go @@ -1,14 +1,21 @@ package auth import ( + "os" + "github.com/labstack/echo/v4" ) func (mod *AuthModule) Routes(g *echo.Group) { auth := g.Group("/auth") + if os.Getenv("ENV") != "local" { + return + } + auth.POST("/register", mod.registerHandler) auth.POST("/login", mod.loginHandler) + auth.POST("/refresh", mod.refreshHandler) auth.POST("/logout", mod.logoutHandler) auth.POST("/forgot-password", mod.forgotPasswordHandler)