mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-03-16.git
synced 2024-08-15 00:53:18 +00:00
DB: Move a forgotten 'UPDATE channels' statement
This commit is contained in:
parent
2ae074a9a4
commit
5ad2fc64b4
2 changed files with 11 additions and 1 deletions
|
@ -42,6 +42,16 @@ module Invidious::Database::Channels
|
||||||
PG_DB.exec(request, Time.utc, author, id)
|
PG_DB.exec(request, Time.utc, author, id)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def update_subscription_time(id : String)
|
||||||
|
request = <<-SQL
|
||||||
|
UPDATE channels
|
||||||
|
SET subscribed = $1
|
||||||
|
WHERE id = $2
|
||||||
|
SQL
|
||||||
|
|
||||||
|
PG_DB.exec(request, Time.utc, id)
|
||||||
|
end
|
||||||
|
|
||||||
def update_mark_deleted(id : String)
|
def update_mark_deleted(id : String)
|
||||||
request = <<-SQL
|
request = <<-SQL
|
||||||
UPDATE channels
|
UPDATE channels
|
||||||
|
|
|
@ -362,7 +362,7 @@ module Invidious::Routes::Feeds
|
||||||
end
|
end
|
||||||
|
|
||||||
if ucid = HTTP::Params.parse(URI.parse(topic).query.not_nil!)["channel_id"]?
|
if ucid = HTTP::Params.parse(URI.parse(topic).query.not_nil!)["channel_id"]?
|
||||||
PG_DB.exec("UPDATE channels SET subscribed = $1 WHERE id = $2", Time.utc, ucid)
|
Invidious::Database::Channels.update_subscription_time(ucid)
|
||||||
elsif plid = HTTP::Params.parse(URI.parse(topic).query.not_nil!)["playlist_id"]?
|
elsif plid = HTTP::Params.parse(URI.parse(topic).query.not_nil!)["playlist_id"]?
|
||||||
Invidious::Database::Playlists.update_subscription_time(plid)
|
Invidious::Database::Playlists.update_subscription_time(plid)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue