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
This commit is contained in:
parent
e1f32cec13
commit
050fb89bfe
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in a new issue