mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Update DB calls for 0.31.0
This commit is contained in:
parent
be2ee33273
commit
4361ea9686
5 changed files with 11 additions and 49 deletions
|
@ -1396,7 +1396,7 @@ post "/login" do |env|
|
|||
user_array[4] = user_array[4].to_json
|
||||
args = arg_array(user_array)
|
||||
|
||||
PG_DB.exec("INSERT INTO users VALUES (#{args})", user_array)
|
||||
PG_DB.exec("INSERT INTO users VALUES (#{args})", args: user_array)
|
||||
PG_DB.exec("INSERT INTO session_ids VALUES ($1, $2, $3)", sid, email, Time.utc)
|
||||
|
||||
view_name = "subscriptions_#{sha256(user.email)}"
|
||||
|
@ -2908,7 +2908,7 @@ post "/feed/webhook/:token" do |env|
|
|||
PG_DB.exec("INSERT INTO channel_videos VALUES (#{args}) \
|
||||
ON CONFLICT (id) DO UPDATE SET title = $2, published = $3, \
|
||||
updated = $4, ucid = $5, author = $6, length_seconds = $7, \
|
||||
live_now = $8, premiere_timestamp = $9, views = $10", video_array)
|
||||
live_now = $8, premiere_timestamp = $9, views = $10", args: video_array)
|
||||
|
||||
# Update all users affected by insert
|
||||
if emails.empty?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue