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.
This commit is contained in:
Zac Gaetano 2026-05-18 23:56:00 -04:00
parent 0f37d01b2d
commit b23700f30a

View file

@ -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/<assetId>/.
const assetIdLive = (await import('uuid')).v4();
const assetIdLive = uuidv4();
try {
await pool.query(
`INSERT INTO assets (