fix: basic
This commit is contained in:
parent
6803a23aa3
commit
beedac385e
|
|
@ -298,9 +298,12 @@ imagesRouter.post(
|
|||
}
|
||||
}
|
||||
|
||||
// Refetch image to include any updates (alias assignment, flow alias)
|
||||
const finalImage = await service.getById(imageRecord.id);
|
||||
|
||||
res.status(201).json({
|
||||
success: true,
|
||||
data: toImageResponse(imageRecord),
|
||||
data: toImageResponse(finalImage!),
|
||||
});
|
||||
} catch (error) {
|
||||
res.status(500).json({
|
||||
|
|
|
|||
|
|
@ -300,6 +300,7 @@ export async function createTestImage(
|
|||
}
|
||||
|
||||
// Helper to resolve alias
|
||||
// Returns format compatible with old /resolve/ endpoint: { imageId, scope, alias, image }
|
||||
export async function resolveAlias(
|
||||
alias: string,
|
||||
flowId?: string
|
||||
|
|
@ -310,5 +311,14 @@ export async function resolveAlias(
|
|||
: `${endpoints.images}/${alias}`;
|
||||
|
||||
const result = await api(endpoint);
|
||||
return result.data.data;
|
||||
const image = result.data.data;
|
||||
|
||||
// Adapt response to match old /resolve/ format for test compatibility
|
||||
return {
|
||||
imageId: image.id,
|
||||
alias: image.alias || alias,
|
||||
scope: image.flowId ? 'flow' : 'project',
|
||||
flowId: image.flowId,
|
||||
image,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue