Release 2.8.1
Publish Docker Image / build-and-push-existing-registry (./build/Dockerfile, web, pulse-signage-web) (push) Successful in 1m16s
Publish Docker Image / build-and-push-existing-registry (./build/Dockerfile.player, player, pulse-signage-player) (push) Successful in 33s

This commit is contained in:
2026-08-16 22:08:32 +01:00
parent 203d0bfc01
commit a5bf8e6f7f
21 changed files with 227 additions and 60 deletions
+17 -6
View File
@@ -159,12 +159,23 @@ module.exports = function registerAnnouncementRoutes(app, deps) {
}
if (selectedIds.length) {
await pool.query(
'INSERT INTO d_announcement_screens (announcement_id, screen_id, created_by, modified_by) VALUES ? ON DUPLICATE KEY UPDATE modified_at = CURRENT_TIMESTAMP, modified_by = VALUES(modified_by)',
[selectedIds.map(function (screenId) {
return [announcementId, screenId, actorId || null, actorId || null];
})]
);
for (const screenId of selectedIds) {
await pool.query(
`UPDATE d_announcement_screens
SET modified_at = CURRENT_TIMESTAMP, modified_by = ?
WHERE announcement_id = ? AND screen_id = ?`,
[actorId || null, announcementId, screenId]
);
await pool.query(
`INSERT INTO d_announcement_screens (announcement_id, screen_id, created_by, modified_by)
SELECT ?, ?, ?, ?
WHERE NOT EXISTS (
SELECT 1 FROM d_announcement_screens
WHERE announcement_id = ? AND screen_id = ?
)`,
[announcementId, screenId, actorId || null, actorId || null, announcementId, screenId]
);
}
}
}