From 0a6e02cf181c94418122d2f478e6a236bcd92523 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9=20=D0=A1=D0=B0?= =?UTF-8?q?=D0=B5=D0=BD=D0=BA=D0=BE?= Date: Sat, 25 Oct 2025 13:57:07 +0300 Subject: [PATCH] change ShouldBind -> ShouldBindWith + binding.Form --- web/controller/inbound.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/controller/inbound.go b/web/controller/inbound.go index e3477936..799830b8 100644 --- a/web/controller/inbound.go +++ b/web/controller/inbound.go @@ -13,6 +13,7 @@ import ( "github.com/mhsanaei/3x-ui/v2/web/session" "github.com/gin-gonic/gin" + "github.com/gin-gonic/gin/binding" ) // InboundController handles HTTP requests related to Xray inbounds management. @@ -122,7 +123,8 @@ func (a *InboundController) addInbound(c *gin.Context) { c.Request.Body = io.NopCloser(bytes.NewBuffer(bodyBytes)) inbound := &model.Inbound{} - err := c.ShouldBind(inbound) + err := c.ShouldBindWith(inbound, binding.Form) + // err := c.ShouldBind(inbound) if err != nil { jsonMsg(c, I18nWeb(c, "somethingWentWrong"), err) return