fix: remove url field
This commit is contained in:
parent
5e52d4ff9c
commit
191a745133
|
|
@ -80,7 +80,6 @@ export interface ImageResponse {
|
||||||
fileHash: string | null;
|
fileHash: string | null;
|
||||||
generationId: string | null;
|
generationId: string | null;
|
||||||
apiKeyId: string | null;
|
apiKeyId: string | null;
|
||||||
url?: string | undefined; // Computed field
|
|
||||||
meta: Record<string, unknown> | null;
|
meta: Record<string, unknown> | null;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
updatedAt: string;
|
updatedAt: string;
|
||||||
|
|
@ -266,7 +265,7 @@ export const toGenerationResponse = (gen: GenerationWithRelations): GenerationRe
|
||||||
updatedAt: gen.updatedAt.toISOString(),
|
updatedAt: gen.updatedAt.toISOString(),
|
||||||
});
|
});
|
||||||
|
|
||||||
export const toImageResponse = (img: Image, includeUrl = true): ImageResponse => ({
|
export const toImageResponse = (img: Image): ImageResponse => ({
|
||||||
id: img.id,
|
id: img.id,
|
||||||
projectId: img.projectId,
|
projectId: img.projectId,
|
||||||
flowId: img.flowId,
|
flowId: img.flowId,
|
||||||
|
|
@ -282,7 +281,6 @@ export const toImageResponse = (img: Image, includeUrl = true): ImageResponse =>
|
||||||
fileHash: img.fileHash,
|
fileHash: img.fileHash,
|
||||||
generationId: img.generationId,
|
generationId: img.generationId,
|
||||||
apiKeyId: img.apiKeyId,
|
apiKeyId: img.apiKeyId,
|
||||||
url: includeUrl ? `/api/v1/images/${img.id}/download` : undefined,
|
|
||||||
meta: img.meta as Record<string, unknown>,
|
meta: img.meta as Record<string, unknown>,
|
||||||
createdAt: img.createdAt.toISOString(),
|
createdAt: img.createdAt.toISOString(),
|
||||||
updatedAt: img.updatedAt.toISOString(),
|
updatedAt: img.updatedAt.toISOString(),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue