From 861aa325e4d21a12045823ea1067275499b4929f Mon Sep 17 00:00:00 2001 From: Oleg Proskurin Date: Sun, 4 Jan 2026 16:54:53 +0700 Subject: [PATCH] fix: use valid UUID for requestId in CDN live URL endpoint The requestId was being set to a string like "live-avatars-1767520170167" which is not a valid UUID. This caused PostgreSQL to reject the insert into the generations table. Now uses req.requestId from the middleware which generates a proper UUID. --- apps/api-service/src/routes/cdn.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api-service/src/routes/cdn.ts b/apps/api-service/src/routes/cdn.ts index ec897f5..c2ecba1 100644 --- a/apps/api-service/src/routes/cdn.ts +++ b/apps/api-service/src/routes/cdn.ts @@ -427,7 +427,7 @@ cdnRouter.get( prompt, aspectRatio: (aspectRatio as string) || GENERATION_LIMITS.DEFAULT_ASPECT_RATIO, autoEnhance: normalizedAutoEnhance, - requestId: `live-${scope}-${Date.now()}`, + requestId: req.requestId, }); if (!generation.outputImage) {