feat: แก้ไข ของ ProductGroup
This commit is contained in:
parent
6d25833fba
commit
85f82693ad
2 changed files with 38 additions and 7 deletions
|
|
@ -74,12 +74,11 @@ const useProductServiceStore = defineStore('api-product-service', () => {
|
|||
return false;
|
||||
}
|
||||
|
||||
async function editProductService(
|
||||
groupId: string,
|
||||
opts: { data: ProductGroupUpdate },
|
||||
) {
|
||||
async function editProductService(groupId: string, data: ProductGroupUpdate) {
|
||||
const { code, ...payload } = data;
|
||||
|
||||
const res = await api.put<ProductGroupUpdate>(`/product-group/${groupId}`, {
|
||||
...opts.data,
|
||||
...payload,
|
||||
});
|
||||
|
||||
if (!res) return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue