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:
parent
df36fc739f
commit
ace3b33344
|
|
@ -266,17 +266,8 @@ func main() {
|
||||||
auth.GET("/verify", authHandler.VerifyEmail)
|
auth.GET("/verify", authHandler.VerifyEmail)
|
||||||
auth.POST("/forgot-password", authHandler.ForgotPassword)
|
auth.POST("/forgot-password", authHandler.ForgotPassword)
|
||||||
auth.POST("/reset-password", authHandler.ResetPassword)
|
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 := v1.Group("")
|
||||||
authorized.Use(middleware.AuthMiddleware(cfg.JWTSecret, dbPool))
|
authorized.Use(middleware.AuthMiddleware(cfg.JWTSecret, dbPool))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue