From 76bf358de768dd045d26541ff38d4229b2fbf402 Mon Sep 17 00:00:00 2001 From: Simon Ding Date: Fri, 12 Jul 2024 11:02:51 +0800 Subject: [PATCH] fix --- server/resources.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/resources.go b/server/resources.go index acf6803..747b010 100644 --- a/server/resources.go +++ b/server/resources.go @@ -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 }