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