mirror of
https://github.com/lzh-1625/go_process_manager.git
synced 2025-10-05 07:56:50 +08:00
1
This commit is contained in:
@@ -15,7 +15,7 @@ func (p *processRepository) GetAllProcessConfig() []model.Process {
|
||||
tx := db.Find(&result)
|
||||
if tx.Error != nil {
|
||||
log.Logger.Error(tx.Error)
|
||||
return []model.Process{}
|
||||
return nil
|
||||
}
|
||||
return result
|
||||
}
|
||||
@@ -28,7 +28,7 @@ func (p *processRepository) GetProcessConfigByUser(username string) []model.Proc
|
||||
Scan(&result)
|
||||
if err != nil {
|
||||
log.Logger.Error(err)
|
||||
return []model.Process{}
|
||||
return nil
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
Reference in New Issue
Block a user