avoid unknown actions

This commit is contained in:
Alireza Ahmadi
2025-01-05 21:52:50 +01:00
parent d86adedd8b
commit 5dd0baad34
4 changed files with 18 additions and 6 deletions
+3
View File
@@ -6,6 +6,7 @@ import (
"s-ui/database/model"
"s-ui/logger"
"s-ui/util"
"s-ui/util/common"
"time"
"gorm.io/gorm"
@@ -85,6 +86,8 @@ func (s *ClientService) Save(tx *gorm.DB, act string, data json.RawMessage, host
if err != nil {
return nil, err
}
default:
return nil, common.NewErrorf("unknown action: %s", act)
}
return inboundIds, nil