chore: add backend

This commit is contained in:
2026-05-09 15:22:24 +02:00
parent eb8ba01159
commit 8ebb6d2370
5 changed files with 396 additions and 4 deletions
+3 -4
View File
@@ -409,9 +409,9 @@ func GetClient2FAStatus(c *gin.Context) {
settings, _ := database.GetSettings()
c.JSON(http.StatusOK, gin.H{
"two_fa_enabled": client.TwoFAEnabled,
"telegram_linked": tgLinked,
"admin_2fa_enabled": settings.Telegram2FAEnabled,
"two_fa_enabled": client.TwoFAEnabled,
"telegram_linked": tgLinked,
"admin_2fa_enabled": settings.Telegram2FAEnabled,
})
}
@@ -454,7 +454,6 @@ func ToggleClient2FA(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{"success": true, "two_fa_enabled": req.Enabled})
}
// ChangePassword permet à un client de changer son mot de passe
func ChangePassword(c *gin.Context) {
var req struct {
CurrentPassword string `json:"current_password" binding:"required"`