From 67ab9dfa8ce8d4e9bd246f97e5a7619c5b1ca388 Mon Sep 17 00:00:00 2001 From: kilo Date: Sun, 29 Oct 2017 04:12:33 +0100 Subject: [PATCH] Update torrentParam.go --- utils/search/torrentParam.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/search/torrentParam.go b/utils/search/torrentParam.go index c7234d1b..97ecbc8e 100644 --- a/utils/search/torrentParam.go +++ b/utils/search/torrentParam.go @@ -48,6 +48,7 @@ type TorrentParam struct { Dlsite string VideoQuality string Tags Tags + Abort bool } // Identifier returns a unique identifier for the struct @@ -136,6 +137,8 @@ func (p *TorrentParam) FromRequest(c *gin.Context) { user, _, _, err := users.FindByUsername(username) if err == nil { p.UserID = uint32(user.ID) + } else { + p.Abort = true } } // For other functions, we need to set userID in the request query