diff --git a/src/stores/product-service/index.ts b/src/stores/product-service/index.ts index 59deabeb..6547c2b1 100644 --- a/src/stores/product-service/index.ts +++ b/src/stores/product-service/index.ts @@ -58,8 +58,12 @@ const useProductServiceStore = defineStore('api-product-service', () => { return false; } - async function createProductService() { - const res = await api.post('/product-group'); + async function createProductService(data: ProductGroupCreate) { + const { code, ...payload } = data; + + const res = await api.post('/product-group', { + ...payload, + }); if (!res) return false;