mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Fix 404 for annotations endpoint
This commit is contained in:
parent
80a567bf1e
commit
ae52ff93b2
1 changed files with 5 additions and 0 deletions
|
@ -2921,6 +2921,11 @@ get "/api/v1/annotations/:id" do |env|
|
||||||
|
|
||||||
response = HTTP::Client.get(URI.parse(location.headers["Location"]))
|
response = HTTP::Client.get(URI.parse(location.headers["Location"]))
|
||||||
|
|
||||||
|
if response.body.empty?
|
||||||
|
env.response.status_code = 404
|
||||||
|
next
|
||||||
|
end
|
||||||
|
|
||||||
if response.status_code != 200
|
if response.status_code != 200
|
||||||
env.response.status_code = response.status_code
|
env.response.status_code = response.status_code
|
||||||
next
|
next
|
||||||
|
|
Loading…
Reference in a new issue