From 7bff382857d91e5916fb1d1c7b57b81050a2fb82 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 15:45:32 +0300 Subject: [PATCH] inbound.UserId = 1 if api if user == nil --- web/controller/inbound.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/controller/inbound.go b/web/controller/inbound.go index ff53a8d5..5d0d1b7b 100644 --- a/web/controller/inbound.go +++ b/web/controller/inbound.go @@ -143,7 +143,11 @@ func (a *InboundController) addInbound(c *gin.Context) { user := session.GetLoginUser(c) // since the request came through the API without a login and session, we don't know what to do with the UserId here // and it's unclear why it's needed in this place anyway - if user != nil { + // so we just set it to 1 to only 1 user only first user + if user == nil { + inbound.UserId = 1 + } else { + inbound.UserId = user.Id } if inbound.Listen == "" || inbound.Listen == "0.0.0.0" || inbound.Listen == "::" || inbound.Listen == "::0" {