Updating video player when switching scene page.

This commit is contained in:
DebaucheryLibrarian
2021-04-25 04:20:38 +02:00
parent fc1c2fc2f3
commit eed563e06f
4 changed files with 29 additions and 17 deletions

View File

@@ -49,7 +49,7 @@ async function removeAlert(alertId) {
await knex('alerts').where('id', alertId).delete();
}
async function notify(scenes, sessionUser) {
async function notify(scenes) {
const releases = await knex.raw(`
SELECT alerts.id as alert_id, alerts.notify, alerts.email, releases.id as scene_id, users.id as user_id
FROM releases
@@ -94,7 +94,6 @@ async function notify(scenes, sessionUser) {
GROUP BY releases.id, users.id, alerts.id;
`, {
sceneIds: scenes.map(scene => scene.id),
userId: sessionUser.id,
});
const notifications = releases.rows.filter(alert => alert.notify);
@@ -110,8 +109,6 @@ async function notify(scenes, sessionUser) {
}
async function updateNotification(notificationId, notification, sessionUser) {
console.log(notification, sessionUser.id);
await knex('notifications')
.where('user_id', sessionUser.id)
.where('id', notificationId)