fix: prune missing image indexes and align instance creation payload
This commit is contained in:
@@ -16,7 +16,7 @@ export function CreateInstance({close, refresh}: {close: () => void; refresh: ()
|
||||
if (!active.current) return;
|
||||
if (!image) throw new Error('请选择可用的本地镜像。');
|
||||
setProgress('正在创建实例,请勿重复提交…');
|
||||
const created = await api.request<Instance>('/instances', 'POST', {name, image_id:image.image_id || image.id, version:image.version});
|
||||
const created = await api.request<Instance>('/instances', 'POST', {name, image_id:image.image_id || image.id});
|
||||
if (!created?.id) throw new Error('未收到实例确认,请刷新实例列表核实,勿重复提交。');
|
||||
if (active.current) {await refresh(); close();}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user