diff --git a/backend/internal/tests/server_test.go b/backend/internal/tests/server_test.go index 9e00e56c..dcbfd919 100644 --- a/backend/internal/tests/server_test.go +++ b/backend/internal/tests/server_test.go @@ -486,7 +486,7 @@ func TestServer(t *testing.T) { assert.NotNil(t, tokenCookie) assert.NotEmpty(t, tokenCookie.Value) - req = httptest.NewRequest(http.MethodGet, "/api/v1/auth/logout", nil) + req = httptest.NewRequest(http.MethodPost, "/api/v1/auth/logout", nil) req.AddCookie(tokenCookie) rec = httptest.NewRecorder() diff --git a/backend/internal/v1/v1_auth/routes.go b/backend/internal/v1/v1_auth/routes.go index b0fb8ed7..4ef80d4d 100644 --- a/backend/internal/v1/v1_auth/routes.go +++ b/backend/internal/v1/v1_auth/routes.go @@ -40,5 +40,5 @@ func SetupAuthRoutes(e *echo.Group, s interfaces.CoreServer) { e.GET("/auth/verify", h.handleVerifyCookie) e.GET("/auth/verify-email", h.handleVerifyEmail, authLimiter.RateLimit()) e.POST("/auth/register", h.handleRegister, authLimiter.RateLimit()) - e.GET("/auth/logout", h.handleLogout, authLimiter.RateLimit()) + e.POST("/auth/logout", h.handleLogout, authLimiter.RateLimit()) }