fix: move ALTCHA endpoints to correct v1 group location
- Move test and ALTCHA endpoints inside the v1 group where they belong - Fix route registration issue by placing routes in correct scope - Both auth and admin ALTCHA challenge endpoints should now work
This commit is contained in:
parent
050fb89bfe
commit
797661ab9b
|
|
@ -262,13 +262,13 @@ func main() {
|
|||
}
|
||||
|
||||
// Test endpoint to verify routing
|
||||
r.GET("/api/v1/test", func(c *gin.Context) {
|
||||
v1.GET("/test", func(c *gin.Context) {
|
||||
c.JSON(200, gin.H{"message": "Route test successful"})
|
||||
})
|
||||
|
||||
// ALTCHA challenge endpoint (no rate limiting)
|
||||
// ALTCHA challenge endpoints (no rate limiting)
|
||||
v1.GET("/auth/altcha-challenge", authHandler.GetAltchaChallenge)
|
||||
r.GET("/api/v1/admin/altcha-challenge", adminHandler.GetAltchaChallenge)
|
||||
v1.GET("/admin/altcha-challenge", adminHandler.GetAltchaChallenge)
|
||||
|
||||
authorized := v1.Group("")
|
||||
authorized.Use(middleware.AuthMiddleware(cfg.JWTSecret, dbPool))
|
||||
|
|
|
|||
Loading…
Reference in a new issue