chore: add waf

This commit is contained in:
2026-03-15 13:31:48 +01:00
parent 2e7340f9a6
commit 42276ca4ff
18 changed files with 164 additions and 3508 deletions
@@ -139,6 +139,23 @@ func UpdateMyProfile(c *gin.Context) {
})
}
// GetMyProfile retourne le profil du client connecté
// GET /api/v1/profile
func GetMyProfile(c *gin.Context) {
database := c.MustGet("database").(*db.Database)
username, exists := c.Get("username")
if !exists {
c.JSON(http.StatusUnauthorized, gin.H{"error": "Non authentifié"})
return
}
client, err := database.GetClientByUsername(username.(string))
if err != nil || client == nil {
c.JSON(http.StatusNotFound, gin.H{"error": "Client non trouvé"})
return
}
c.JSON(http.StatusOK, gin.H{"success": true, "client": sanitizeClient(client)})
}
// ============================================
// MODIFICATION PROFIL CLIENT (PAR ADMIN)
// ============================================