From b23700f30a7561c8111803f8c78bcceaa9f6ab54 Mon Sep 17 00:00:00 2001 From: ZGaetano Date: Mon, 18 May 2026 23:56:00 -0400 Subject: [PATCH] fix(recorders): use already-imported uuidv4 instead of dynamic import Dynamic `(await import('uuid')).v4()` inside the /start route handler re-imports the module every call (though Node caches it). uuidv4 is already imported at the top of the file. --- services/mam-api/src/routes/recorders.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/mam-api/src/routes/recorders.js b/services/mam-api/src/routes/recorders.js index 95618b4..a4774cf 100644 --- a/services/mam-api/src/routes/recorders.js +++ b/services/mam-api/src/routes/recorders.js @@ -285,7 +285,7 @@ router.post('/:id/start', async (req, res, next) => { // live-asset: create the asset row right now (status='live') so the library // shows the recording while it is happening. The capture container will // tee an HLS stream into /live//. - const assetIdLive = (await import('uuid')).v4(); + const assetIdLive = uuidv4(); try { await pool.query( `INSERT INTO assets (