From dcc274ea802407f250dc63c6e22dd3e96eccee50 Mon Sep 17 00:00:00 2001 From: YouROK <8YouROK8@mail.ru> Date: Mon, 30 Jan 2023 11:45:45 +0300 Subject: [PATCH] return empty list --- server/web/api/rutor.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/web/api/rutor.go b/server/web/api/rutor.go index 3afbbe7..3127628 100644 --- a/server/web/api/rutor.go +++ b/server/web/api/rutor.go @@ -3,10 +3,14 @@ package api import ( "github.com/gin-gonic/gin" "server/rutor" + "server/rutor/models" ) func rutorSearch(c *gin.Context) { query := c.Query("query") list := rutor.Search(query) + if list == nil { + list = []*models.TorrentDetails{} + } c.JSON(200, list) }