fix: remove duplicate altcha_handler.go (methods already in admin/auth handlers)
This commit is contained in:
parent
57cb964737
commit
9348765b68
|
|
@ -1,32 +0,0 @@
|
|||
package handlers
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"gitlab.com/patrickbritton3/sojorn/go-backend/internal/services"
|
||||
)
|
||||
|
||||
func (h *AdminHandler) GetAltchaChallenge(c *gin.Context) {
|
||||
altchaService := services.NewAltchaService(h.jwtSecret) // Use JWT secret as ALTCHA secret for now
|
||||
|
||||
challenge, err := altchaService.GenerateChallenge()
|
||||
if err != nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": "Failed to generate challenge"})
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, challenge)
|
||||
}
|
||||
|
||||
func (h *AuthHandler) GetAltchaChallenge(c *gin.Context) {
|
||||
altchaService := services.NewAltchaService(h.config.JWTSecret)
|
||||
|
||||
challenge, err := altchaService.GenerateChallenge()
|
||||
if err != nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": "Failed to generate challenge"})
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, challenge)
|
||||
}
|
||||
Loading…
Reference in a new issue