fix: trace job imported wordcloud stickers

This commit is contained in:
2026-09-13 01:01:18 +08:00
parent 7e275798e7
commit 7f4ac45639
3 changed files with 13 additions and 2 deletions
+2 -1
View File
@@ -154,7 +154,7 @@ export async function addStickerAssetFromJob(
): Promise<StickerAsset> {
const form = new FormData();
form.append('name', name || `词云 ${new Date().toLocaleString('zh-CN')}`);
form.append('type', 'sticker');
form.append('type', 'wordcloud');
const res = await ensureOk(
await fetch(apiUrl(`/api/assets/from-job/${jobId}`), { method: 'POST', body: form }),
'从任务导入贴纸失败',
@@ -166,6 +166,7 @@ export async function addStickerAssetFromJob(
type: asset.mime_type === 'image/svg+xml' ? 'svg' : 'image',
source: asset.file_url,
createdAt: asset.created_at,
jobId: asset.job_id || undefined,
mimeType: asset.mime_type,
};
window.dispatchEvent(new CustomEvent(STICKER_LIBRARY_EVENT));