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

This commit is contained in:
2026-08-16 22:41:39 +01:00
parent a5bf8e6f7f
commit ea72747822
31 changed files with 379 additions and 31 deletions
+12 -1
View File
@@ -1,5 +1,7 @@
// Admin manage routes for screens and commands.
const { buildAuditChanges } = require('#src/data/audit-log');
module.exports = function registerManageRoutes(app, deps) {
const pool = deps.pool;
const common = deps.common;
@@ -248,6 +250,15 @@ module.exports = function registerManageRoutes(app, deps) {
const previousPlaylistId = screen.playlist_id;
const slug = String(screen.slug || '').trim();
const previousSlug = String(screen.slug || '').trim();
const changes = buildAuditChanges({
name: screen.name,
slug: previousSlug,
playlistId: previousPlaylistId === null ? null : Number(previousPlaylistId)
}, {
name: name,
slug: slug,
playlistId: playlistId
});
await pool.query('UPDATE d_screens SET name = ?, slug = ?, playlist_id = ?, modified_by = ? WHERE id = ?', [name, slug, playlistId, getAuditUserId(req), screen.id]);
if (previousPlaylistId !== playlistId && previousSlug) {
await notifyPlayerScreens([previousSlug], 'refresh');
@@ -264,7 +275,7 @@ module.exports = function registerManageRoutes(app, deps) {
await forwardPlayerCommand(previousSlug, redirectPayload);
}
}
if (typeof recordRequestAuditEvent === 'function') await recordRequestAuditEvent(pool, req, { category: 'screens', eventType: 'screen.updated', actorUserId: getAuditUserId(req), targetType: 'screen', targetId: screen.id, targetLabel: name, details: { slug: slug, playlistId: playlistId } });
if (typeof recordRequestAuditEvent === 'function') await recordRequestAuditEvent(pool, req, { category: 'screens', eventType: 'screen.updated', actorUserId: getAuditUserId(req), targetType: 'screen', targetId: screen.id, targetLabel: name, details: { changes: changes } });
redirectAfterSave(req, res, '/screens?edit=' + screen.id, {
closeUrl: '/screens',
newUrl: '/screens/new',