fix: แก้ Page

This commit is contained in:
Net 2024-06-26 11:26:29 +07:00
parent 230eb3f656
commit de4aa8c585
2 changed files with 41 additions and 18 deletions

View file

@ -73,16 +73,15 @@ const useProductServiceStore = defineStore('api-product-service', () => {
const query = params.toString();
const res = await api.get<(ProductGroup & { productGroupId: string })[]>(
`/product-type${(params && '?'.concat(query)) || ''}`,
{
headers: {
'X-Session-Id': flow?.sessionId,
'X-Rtid': flow?.refTransactionId || flowStore.rtid,
'X-Tid': flow?.transactionId,
},
const res = await api.get<
Pagination<(ProductGroup & { productGroupId: string })[]>
>(`/product-type${(params && '?'.concat(query)) || ''}`, {
headers: {
'X-Session-Id': flow?.sessionId,
'X-Rtid': flow?.refTransactionId || flowStore.rtid,
'X-Tid': flow?.transactionId,
},
);
});
if (!res) return false;
if (res.status === 200) {
@ -187,7 +186,7 @@ const useProductServiceStore = defineStore('api-product-service', () => {
const query = params.toString();
const res = await api.get<ProductGroup[]>(
const res = await api.get<Pagination<ProductGroup[]>>(
`/product-group${(params && '?'.concat(query)) || ''}`,
{
headers: {