feat(attendance): add notification delivery and NFC security foundation
This commit is contained in:
14
backend/command-api/scripts/dispatch-notifications.mjs
Normal file
14
backend/command-api/scripts/dispatch-notifications.mjs
Normal file
@@ -0,0 +1,14 @@
|
||||
import { dispatchPendingNotifications } from '../src/services/notification-dispatcher.js';
|
||||
import { closePool } from '../src/services/db.js';
|
||||
|
||||
try {
|
||||
const summary = await dispatchPendingNotifications();
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(JSON.stringify({ ok: true, summary }, null, 2));
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(JSON.stringify({ ok: false, error: error?.message || String(error) }, null, 2));
|
||||
process.exitCode = 1;
|
||||
} finally {
|
||||
await closePool();
|
||||
}
|
||||
Reference in New Issue
Block a user