fix: remove url field

This commit is contained in:
Oleg Proskurin 2025-11-23 21:28:31 +07:00
parent 5e52d4ff9c
commit 191a745133
1 changed files with 1 additions and 3 deletions

View File

@ -80,7 +80,6 @@ export interface ImageResponse {
fileHash: string | null;
generationId: string | null;
apiKeyId: string | null;
url?: string | undefined; // Computed field
meta: Record<string, unknown> | null;
createdAt: string;
updatedAt: string;
@ -266,7 +265,7 @@ export const toGenerationResponse = (gen: GenerationWithRelations): GenerationRe
updatedAt: gen.updatedAt.toISOString(),
});
export const toImageResponse = (img: Image, includeUrl = true): ImageResponse => ({
export const toImageResponse = (img: Image): ImageResponse => ({
id: img.id,
projectId: img.projectId,
flowId: img.flowId,
@ -282,7 +281,6 @@ export const toImageResponse = (img: Image, includeUrl = true): ImageResponse =>
fileHash: img.fileHash,
generationId: img.generationId,
apiKeyId: img.apiKeyId,
url: includeUrl ? `/api/v1/images/${img.id}/download` : undefined,
meta: img.meta as Record<string, unknown>,
createdAt: img.createdAt.toISOString(),
updatedAt: img.updatedAt.toISOString(),