fix nil pointer

This commit is contained in:
Дмитрий Саенко 2025-10-28 09:16:00 +03:00
parent 5c25855635
commit 97729cb3dc

View file

@ -88,6 +88,7 @@ func (a *InboundController) initRouter(g *gin.RouterGroup) {
func (a *InboundController) getInbounds(c *gin.Context) {
user := session.GetLoginUser(c)
if user == nil {
user = &model.User{}
user.Id = 1
}
inbounds, err := a.inboundService.GetInbounds(user.Id)