mirror of
https://github.com/iv-org/invidious.git
synced 2025-05-19 04:51:10 +00:00
fix: pass user to query.process
if present.
Fixes https://github.com/iv-org/invidious/issues/5097
This commit is contained in:
parent
d1bc15b8bf
commit
25eade589f
@ -58,7 +58,11 @@ module Invidious::Routes::Search
|
|||||||
end
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
items = query.process
|
if user
|
||||||
|
items = query.process(user.as(User))
|
||||||
|
else
|
||||||
|
items = query.process
|
||||||
|
end
|
||||||
rescue ex : ChannelSearchException
|
rescue ex : ChannelSearchException
|
||||||
return error_template(404, "Unable to find channel with id of '#{HTML.escape(ex.channel)}'. Are you sure that's an actual channel id? It should look like 'UC4QobU6STFB0P71PMvOGN5A'.")
|
return error_template(404, "Unable to find channel with id of '#{HTML.escape(ex.channel)}'. Are you sure that's an actual channel id? It should look like 'UC4QobU6STFB0P71PMvOGN5A'.")
|
||||||
rescue ex
|
rescue ex
|
||||||
|
Loading…
x
Reference in New Issue
Block a user