fix: move ALTCHA challenge endpoints to correct router groups

- Move auth ALTCHA challenge to /api/v1/auth group
- Move admin ALTCHA challenge to root router before admin login
- Fix route registration issue where endpoints were not accessible
This commit is contained in:
Patrick Britton 2026-02-16 22:40:26 -06:00
parent a3fcfe67ab
commit 45a7655f88

View file

@ -260,6 +260,7 @@ 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)
}
authorized := v1.Group("")
@ -510,8 +511,7 @@ func main() {
}
}
// ALTCHA challenge endpoints (no auth required)
r.GET("/api/v1/auth/altcha-challenge", authHandler.GetAltchaChallenge)
// Admin ALTCHA challenge endpoint (no auth required)
r.GET("/api/v1/admin/altcha-challenge", adminHandler.GetAltchaChallenge)
// Admin login (no auth middleware - this IS the auth step)