chore: build
Backend - Build & Lint / build (push) Has been cancelled

This commit is contained in:
Nuxgrid
2026-07-11 19:58:15 +02:00
parent 5ac824be81
commit 536bce4625
3 changed files with 20 additions and 6 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )
// IPNWebhook - POST /api/v1/webhooks/nowpayments // IPNWebhook - POST /api/v1/webhook/nowpayments
func IPNWebhook(c *gin.Context) { func IPNWebhook(c *gin.Context) {
database := c.MustGet("database").(*db.Database) database := c.MustGet("database").(*db.Database)
np, ok := c.MustGet("nowpayments").(*services.NowPaymentsClient) np, ok := c.MustGet("nowpayments").(*services.NowPaymentsClient)
+5 -5
View File
@@ -123,7 +123,7 @@ func SetupRoutes(router *gin.Engine, database *db.Database, geoService *services
// ============================================ // ============================================
// 💸 WEBHOOK NOWPAYMENTS (v1) - PUBLIC (pas d'auth, vérifié par HMAC) // 💸 WEBHOOK NOWPAYMENTS (v1) - PUBLIC (pas d'auth, vérifié par HMAC)
// ============================================ // ============================================
router.POST("/api/v1/webhooks/nowpayments", handlers.IPNWebhook) router.POST("/api/v1/webhook/nowpayments", handlers.IPNWebhook)
// ============================================ // ============================================
// 🤖 WEBHOOK TELEGRAM - PUBLIC (sécurisé par secret header) // 🤖 WEBHOOK TELEGRAM - PUBLIC (sécurisé par secret header)
@@ -268,10 +268,10 @@ func SetupRoutes(router *gin.Engine, database *db.Database, geoService *services
adminGroupV2.POST("/penalty", handlers.ApplyClientPenalty) // Appliquer pénalité adminGroupV2.POST("/penalty", handlers.ApplyClientPenalty) // Appliquer pénalité
adminGroupV2.GET("/client/:username/penalties", handlers.GetClientPenaltiesAdmin) // Voir pénalités client adminGroupV2.GET("/client/:username/penalties", handlers.GetClientPenaltiesAdmin) // Voir pénalités client
adminGroupV2.POST("/client/:username/penalties/reset", handlers.ResetClientPenaltiesAdmin) // Reset amende adminGroupV2.POST("/client/:username/penalties/reset", handlers.ResetClientPenaltiesAdmin) // Reset amende
adminGroupV2.POST("/client/:username/point/reset", handlers.ResetClientPointAdmin) // Reset points → 0 adminGroupV2.POST("/client/:username/point/reset", handlers.ResetClientPointAdmin) // Reset points → 0
adminGroupV2.POST("/client/:username/points/add", handlers.AddClientPointsAdmin) // Ajouter points par pool adminGroupV2.POST("/client/:username/points/add", handlers.AddClientPointsAdmin) // Ajouter points par pool
adminGroupV2.POST("/client/:username/points/subtract", handlers.SubtractClientPointsAdmin) // Enlever points par pool adminGroupV2.POST("/client/:username/points/subtract", handlers.SubtractClientPointsAdmin) // Enlever points par pool
adminGroupV2.POST("/client/:username/rewards/reset", handlers.AdminResetClientRedeemed) // Reset récompenses réclamées adminGroupV2.POST("/client/:username/rewards/reset", handlers.AdminResetClientRedeemed) // Reset récompenses réclamées
adminGroupV2.GET("/penalties/all", handlers.GetAllClientsWithPenalties) // Liste clients avec pénalités adminGroupV2.GET("/penalties/all", handlers.GetAllClientsWithPenalties) // Liste clients avec pénalités
adminGroupV2.GET("/penalties/stats", handlers.GetPenaltiesStats) adminGroupV2.GET("/penalties/stats", handlers.GetPenaltiesStats)
+14
View File
@@ -141,6 +141,20 @@ server {
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
} }
location = /webhook/nowpayement {
limit_except POST { deny all; }
set $upstream_backend http://backend:8080;
proxy_pass $upstream_backend;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# --------------------------------------------------- # ---------------------------------------------------
# Webhooks LBTelegram (/webhook/bot1, /webhook/bot2…) # Webhooks LBTelegram (/webhook/bot1, /webhook/bot2…)
# --------------------------------------------------- # ---------------------------------------------------