This commit is contained in:
Viet An
2026-06-11 09:16:47 +07:00
parent 03f3112573
commit a5a88b3b1c
6 changed files with 49 additions and 50 deletions

View File

@@ -73,11 +73,11 @@ const refreshData = inject("refreshData");
async function submit() {
isPending.value = true;
const res = props.variantId
? await $patchapi("product", {
? await $patchapi("Product", {
id: productVariant.value.product,
...body.value,
})
: await $insertapi("product", { data: body.value });
: await $insertapi("Product", { data: body.value });
if (res !== "error") {
if (refreshData) refreshData();
}