fix: แก้รับค่า createProductService

This commit is contained in:
Net 2024-06-11 15:02:17 +07:00
parent 16fcec3a54
commit 5b7e8f7b52

View file

@ -58,8 +58,12 @@ const useProductServiceStore = defineStore('api-product-service', () => {
return false; return false;
} }
async function createProductService() { async function createProductService(data: ProductGroupCreate) {
const res = await api.post<ProductGroupCreate>('/product-group'); const { code, ...payload } = data;
const res = await api.post<ProductGroupCreate>('/product-group', {
...payload,
});
if (!res) return false; if (!res) return false;