Move DB queries related to 'annotations' in a separate module

This commit is contained in:
Samantaz Fox
2021-12-06 17:24:49 +01:00
parent 85cf27119c
commit 914cfbd953
3 changed files with 26 additions and 2 deletions

View File

@@ -183,7 +183,7 @@ def cache_annotation(db, id, annotations)
end
end
db.exec("INSERT INTO annotations VALUES ($1, $2) ON CONFLICT DO NOTHING", id, annotations) if has_legacy_annotations
Invidious::Database::Annotations.insert(id, annotations) if has_legacy_annotations
end
def create_notification_stream(env, topics, connection_channel)