add debug log

This commit is contained in:
Дмитрий Саенко 2025-10-23 21:15:56 +03:00
parent 1f3a7c947a
commit 5e98521fbb

View file

@ -103,6 +103,16 @@ func (a *InboundController) getClientTrafficsById(c *gin.Context) {
// addInbound creates a new inbound configuration. // addInbound creates a new inbound configuration.
func (a *InboundController) addInbound(c *gin.Context) { func (a *InboundController) addInbound(c *gin.Context) {
body := c.Request.PostForm.Encode()
defer func() {
err := c.Request.Body.Close()
if err != nil {
logger.Errorf("error closing request body: %v", err)
}
}()
logger.Debugf("debug request body: %v", body)
inbound := &model.Inbound{} inbound := &model.Inbound{}
err := c.ShouldBind(inbound) err := c.ShouldBind(inbound)
if err != nil { if err != nil {