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.
This commit is contained in:
Oleg Proskurin 2026-01-04 16:54:53 +07:00
parent 1aa307aac9
commit 861aa325e4
1 changed files with 1 additions and 1 deletions

View File

@ -427,7 +427,7 @@ cdnRouter.get(
prompt, prompt,
aspectRatio: (aspectRatio as string) || GENERATION_LIMITS.DEFAULT_ASPECT_RATIO, aspectRatio: (aspectRatio as string) || GENERATION_LIMITS.DEFAULT_ASPECT_RATIO,
autoEnhance: normalizedAutoEnhance, autoEnhance: normalizedAutoEnhance,
requestId: `live-${scope}-${Date.now()}`, requestId: req.requestId,
}); });
if (!generation.outputImage) { if (!generation.outputImage) {