From 1548558be8666909736548adb86d2b9914b7053f Mon Sep 17 00:00:00 2001 From: Net <93821485+somnetsak123@users.noreply.github.com> Date: Mon, 24 Jun 2024 16:25:02 +0700 Subject: [PATCH] =?UTF-8?q?fix:=20=E0=B8=95=E0=B8=A3=E0=B8=A7=E0=B8=88?= =?UTF-8?q?=E0=B8=AA=E0=B8=AD=E0=B8=9A=20status=20CREATED=20=E0=B8=81?= =?UTF-8?q?=E0=B9=88=E0=B8=AD=E0=B8=99=E0=B8=A2=E0=B8=B4=E0=B8=87=20?= =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84=E0=B8=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/product-service/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/stores/product-service/index.ts b/src/stores/product-service/index.ts index 3e0bbd8e..717ba369 100644 --- a/src/stores/product-service/index.ts +++ b/src/stores/product-service/index.ts @@ -430,7 +430,7 @@ const useProductServiceStore = defineStore('api-product-service', () => { } async function createService(data: ServiceCreate) { - const { image, ...payload } = data; + const { image, status, ...payload } = data; const res = await api.post( '/service', @@ -508,6 +508,10 @@ const useProductServiceStore = defineStore('api-product-service', () => { ) { const { image, code, ...payload } = data; + if (payload.status === 'CREATED') { + delete payload.status; + } + const res = await api.put( `/service/${serviceId}`, {