mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2023-06-08.git
synced 2024-08-15 00:53:38 +00:00
format invidious.cr using crystal cli
This commit is contained in:
parent
9689376de6
commit
84487b2e52
1 changed files with 5 additions and 5 deletions
|
@ -1563,12 +1563,12 @@ post "/feed/webhook/:token" do |env|
|
||||||
views: video.views,
|
views: video.views,
|
||||||
})
|
})
|
||||||
|
|
||||||
was_insert = PG_DB.query_one("INSERT INTO channel_videos VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) \
|
was_insert = PG_DB.query_one("INSERT INTO channel_videos VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)
|
||||||
ON CONFLICT (id) DO UPDATE SET title = $2, published = $3, \
|
ON CONFLICT (id) DO UPDATE SET title = $2, published = $3,
|
||||||
updated = $4, ucid = $5, author = $6, length_seconds = $7, \
|
updated = $4, ucid = $5, author = $6, length_seconds = $7,
|
||||||
live_now = $8, premiere_timestamp = $9, views = $10 returning (xmax=0) as was_insert", *video.to_tuple, as: Bool)
|
live_now = $8, premiere_timestamp = $9, views = $10 returning (xmax=0) as was_insert", *video.to_tuple, as: Bool)
|
||||||
|
|
||||||
PG_DB.exec("UPDATE users SET notifications = array_append(notifications, $1), \
|
PG_DB.exec("UPDATE users SET notifications = array_append(notifications, $1),
|
||||||
feed_needs_update = true WHERE $2 = ANY(subscriptions)", video.id, video.ucid) if was_insert
|
feed_needs_update = true WHERE $2 = ANY(subscriptions)", video.id, video.ucid) if was_insert
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue