From 5c25855635f0d67077093c2f0334d43bcd59176f 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: Tue, 28 Oct 2025 09:07:34 +0300 Subject: [PATCH] fix error with null user when api throw apikey --- web/controller/inbound.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/controller/inbound.go b/web/controller/inbound.go index 05e8698f..bdad7e43 100644 --- a/web/controller/inbound.go +++ b/web/controller/inbound.go @@ -87,6 +87,9 @@ func (a *InboundController) initRouter(g *gin.RouterGroup) { // getInbounds retrieves the list of inbounds for the logged-in user. func (a *InboundController) getInbounds(c *gin.Context) { user := session.GetLoginUser(c) + if user == nil { + user.Id = 1 + } inbounds, err := a.inboundService.GetInbounds(user.Id) if err != nil { jsonMsg(c, I18nWeb(c, "pages.inbounds.toasts.obtain"), err)