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}`, {