Move DB queries related to playlists in a separate module (3/3)

This commit is contained in:
Samantaz Fox
2021-12-06 17:02:15 +01:00
parent 7691f53520
commit 85cf27119c
5 changed files with 94 additions and 10 deletions

View File

@@ -138,7 +138,7 @@ we're going to need to do it here in order to allow for translations.
</p>
<% if user %>
<% playlists = PG_DB.query_all("SELECT id,title FROM playlists WHERE author = $1 AND id LIKE 'IV%'", user.email, as: {String, String}) %>
<% playlists = Invidious::Database::Playlists.select_user_created_playlists(user.email) %>
<% if !playlists.empty? %>
<form data-onsubmit="return_false" class="pure-form pure-form-stacked" action="/playlist_ajax" method="post">
<div class="pure-control-group">