mirror of
https://github.com/lzh-1625/go_process_manager.git
synced 2025-10-05 16:06:51 +08:00
1
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user