fix: valider data.image.src dans uploadProductImage

This commit is contained in:
2026-06-08 17:10:26 +02:00
parent 9675366db9
commit 53008d1d43
+3
View File
@@ -76,5 +76,8 @@ export async function uploadProductImage(
}
const data = await res.json()
if (!data.image?.src) {
throw new Error('Shopify response invalide : champ image.src manquant')
}
return { url: data.image.src as string }
}