From 050fb89bfedfc0746d0def7c2493a754e09ca5f8 Mon Sep 17 00:00:00 2001 From: Patrick Britton Date: Mon, 16 Feb 2026 22:47:06 -0600 Subject: [PATCH] fix: add test endpoint and fix ALTCHA route registration - Add simple test endpoint to verify routing works - Register both auth and admin ALTCHA challenge endpoints - Use consistent routing pattern for both endpoints --- go-backend/cmd/api/main.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/go-backend/cmd/api/main.go b/go-backend/cmd/api/main.go index 6b846b4..8384b40 100644 --- a/go-backend/cmd/api/main.go +++ b/go-backend/cmd/api/main.go @@ -261,8 +261,14 @@ func main() { auth.POST("/reset-password", authHandler.ResetPassword) } + // Test endpoint to verify routing + r.GET("/api/v1/test", func(c *gin.Context) { + c.JSON(200, gin.H{"message": "Route test successful"}) + }) + // ALTCHA challenge endpoint (no rate limiting) v1.GET("/auth/altcha-challenge", authHandler.GetAltchaChallenge) + r.GET("/api/v1/admin/altcha-challenge", adminHandler.GetAltchaChallenge) authorized := v1.Group("") authorized.Use(middleware.AuthMiddleware(cfg.JWTSecret, dbPool))