This commit is contained in:
lzh
2025-09-01 09:57:30 +08:00
parent c22384fbc0
commit d550942cd2

View File

@@ -15,7 +15,7 @@ func (p *processRepository) GetAllProcessConfig() []model.Process {
tx := db.Find(&result) tx := db.Find(&result)
if tx.Error != nil { if tx.Error != nil {
log.Logger.Error(tx.Error) log.Logger.Error(tx.Error)
return []model.Process{} return nil
} }
return result return result
} }
@@ -28,7 +28,7 @@ func (p *processRepository) GetProcessConfigByUser(username string) []model.Proc
Scan(&result) Scan(&result)
if err != nil { if err != nil {
log.Logger.Error(err) log.Logger.Error(err)
return []model.Process{} return nil
} }
return result return result
} }