mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-24 03:48:49 +00:00
db: use now() function instead of passing Time.utc
This commit is contained in:
@@ -59,11 +59,11 @@ module Invidious::Database::Playlists
|
||||
def update_subscription_time(id : String)
|
||||
request = <<-SQL
|
||||
UPDATE playlists
|
||||
SET subscribed = $1
|
||||
WHERE id = $2
|
||||
SET subscribed = now()
|
||||
WHERE id = $1
|
||||
SQL
|
||||
|
||||
PG_DB.exec(request, Time.utc, id)
|
||||
PG_DB.exec(request, id)
|
||||
end
|
||||
|
||||
def update_video_added(id : String, index : String | Int64)
|
||||
@@ -71,11 +71,11 @@ module Invidious::Database::Playlists
|
||||
UPDATE playlists
|
||||
SET index = array_append(index, $1),
|
||||
video_count = cardinality(index) + 1,
|
||||
updated = $2
|
||||
WHERE id = $3
|
||||
updated = now()
|
||||
WHERE id = $2
|
||||
SQL
|
||||
|
||||
PG_DB.exec(request, index, Time.utc, id)
|
||||
PG_DB.exec(request, index, id)
|
||||
end
|
||||
|
||||
def update_video_removed(id : String, index : String | Int64)
|
||||
@@ -83,11 +83,11 @@ module Invidious::Database::Playlists
|
||||
UPDATE playlists
|
||||
SET index = array_remove(index, $1),
|
||||
video_count = cardinality(index) - 1,
|
||||
updated = $2
|
||||
WHERE id = $3
|
||||
updated = now()
|
||||
WHERE id = $2
|
||||
SQL
|
||||
|
||||
PG_DB.exec(request, index, Time.utc, id)
|
||||
PG_DB.exec(request, index, id)
|
||||
end
|
||||
|
||||
# -------------------
|
||||
|
||||
Reference in New Issue
Block a user