diff options
| author | syeopite <syeopite@syeopite.dev> | 2025-05-17 16:18:37 -0700 |
|---|---|---|
| committer | syeopite <syeopite@syeopite.dev> | 2025-05-17 16:18:37 -0700 |
| commit | ef07c542dc791b061aea193ff076adc02e0ad9c5 (patch) | |
| tree | c1d97016b8df6b303cd920f6a0432e8def228e99 /src | |
| parent | a9180aa6c16a0251871755ce12c150fd4c016822 (diff) | |
| parent | 25eade589f28e41de03111fadc6140cade7af725 (diff) | |
| download | invidious-ef07c542dc791b061aea193ff076adc02e0ad9c5.tar.gz invidious-ef07c542dc791b061aea193ff076adc02e0ad9c5.tar.bz2 invidious-ef07c542dc791b061aea193ff076adc02e0ad9c5.zip | |
fix: pass user to query.process if present (#5277)
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious/routes/search.cr | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/invidious/routes/search.cr b/src/invidious/routes/search.cr index 44970922..b195c7b3 100644 --- a/src/invidious/routes/search.cr +++ b/src/invidious/routes/search.cr @@ -58,7 +58,11 @@ module Invidious::Routes::Search end begin - items = query.process + if user + items = query.process(user.as(User)) + else + items = query.process + end 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'.") rescue ex |
