mirror of
https://github.com/simon-ding/polaris.git
synced 2026-02-26 13:40:47 +08:00
fix
This commit is contained in:
@@ -65,7 +65,7 @@ func (s *Server) DeleteTorznabInfo(c *gin.Context) (interface{}, error) {
|
||||
func (s *Server) GetAllIndexers(c *gin.Context) (interface{}, error) {
|
||||
indexers := s.db.GetAllTorznabInfo()
|
||||
if len(indexers) == 0 {
|
||||
return nil, fmt.Errorf("no indexer found")
|
||||
return nil, nil
|
||||
}
|
||||
return indexers, nil
|
||||
}
|
||||
@@ -200,7 +200,7 @@ func (s *Server) AddDownloadClient(c *gin.Context) (interface{}, error) {
|
||||
func (s *Server) GetAllDonloadClients(c *gin.Context) (interface{}, error) {
|
||||
res := s.db.GetAllDonloadClients()
|
||||
if len(res) == 0 {
|
||||
return nil, fmt.Errorf("no download client")
|
||||
return nil, nil
|
||||
}
|
||||
return res, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user