Clean useless database arguments (3/5)

This commit is contained in:
Samantaz Fox
2021-12-07 00:42:55 +01:00
parent c25d664edc
commit 40ed4a0506
7 changed files with 21 additions and 21 deletions

View File

@@ -6,9 +6,9 @@ module Invidious::Routes::Embed
if plid = env.params.query["list"]?.try &.gsub(/[^a-zA-Z0-9_-]/, "")
begin
playlist = get_playlist(PG_DB, plid, locale: locale)
playlist = get_playlist(plid, locale: locale)
offset = env.params.query["index"]?.try &.to_i? || 0
videos = get_playlist_videos(PG_DB, playlist, offset: offset, locale: locale)
videos = get_playlist_videos(playlist, offset: offset, locale: locale)
rescue ex
return error_template(500, ex)
end
@@ -60,9 +60,9 @@ module Invidious::Routes::Embed
if plid
begin
playlist = get_playlist(PG_DB, plid, locale: locale)
playlist = get_playlist(plid, locale: locale)
offset = env.params.query["index"]?.try &.to_i? || 0
videos = get_playlist_videos(PG_DB, playlist, offset: offset, locale: locale)
videos = get_playlist_videos(playlist, offset: offset, locale: locale)
rescue ex
return error_template(500, ex)
end