mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-19 19:38:51 +00:00
Move DB queries related to 'annotations' in a separate module
This commit is contained in:
@@ -239,7 +239,7 @@ module Invidious::Routes::API::V1::Videos
|
||||
|
||||
case source
|
||||
when "archive"
|
||||
if CONFIG.cache_annotations && (cached_annotation = PG_DB.query_one?("SELECT * FROM annotations WHERE id = $1", id, as: Annotation))
|
||||
if CONFIG.cache_annotations && (cached_annotation = Invidious::Database::Annotations.select(id))
|
||||
annotations = cached_annotation.annotations
|
||||
else
|
||||
index = CHARS_SAFE.index(id[0]).not_nil!.to_s.rjust(2, '0')
|
||||
|
||||
Reference in New Issue
Block a user