fix: remove duplicate ALTCHA route registrations

- Remove duplicate routes from auth and v1 groups
- Keep only the main router registrations
- This fixes the panic on startup
This commit is contained in:
Patrick Britton 2026-02-16 23:23:35 -06:00
parent df36fc739f
commit ace3b33344

View file

@ -266,17 +266,8 @@ func main() {
auth.GET("/verify", authHandler.VerifyEmail)
auth.POST("/forgot-password", authHandler.ForgotPassword)
auth.POST("/reset-password", authHandler.ResetPassword)
auth.GET("/altcha-challenge", authHandler.GetAltchaChallenge)
}
// Test endpoint to verify routing
v1.GET("/test", func(c *gin.Context) {
c.JSON(200, gin.H{"message": "Route test successful"})
})
// Admin ALTCHA challenge endpoint (no auth required)
v1.GET("/admin/altcha-challenge", adminHandler.GetAltchaChallenge)
authorized := v1.Group("")
authorized.Use(middleware.AuthMiddleware(cfg.JWTSecret, dbPool))
{