|
|
@ -4042,8 +4042,14 @@ get "/api/v1/annotations/:id" do |env|
|
|
|
|
annotations = response.body
|
|
|
|
annotations = response.body
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
etag = sha256(annotations)[0, 16]
|
|
|
|
|
|
|
|
if env.request.headers["If-None-Match"]?.try &.== etag
|
|
|
|
|
|
|
|
env.response.status_code = 304
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
env.response.headers["ETag"] = etag
|
|
|
|
annotations
|
|
|
|
annotations
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
get "/api/v1/videos/:id" do |env|
|
|
|
|
get "/api/v1/videos/:id" do |env|
|
|
|
|
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
|
|
|
|
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
|
|
|
|