diff --git a/src/stores/payment/index.ts b/src/stores/payment/index.ts index 8e9bf34c..1f465d45 100644 --- a/src/stores/payment/index.ts +++ b/src/stores/payment/index.ts @@ -6,16 +6,14 @@ import { Invoice, InvoicePayload, Payment, Receipt } from './types'; import { manageAttachment } from '../utils'; export const usePayment = defineStore('payment-store', () => { - const data = ref<{}[]>([]); + const data = ref([]); const page = ref(1); const pageMax = ref(1); const pageSize = ref(30); async function getPayment(id: string) { const res = await api.get(`/payment/${id}`); - if (res.status >= 400) return null; - return res.data; } @@ -28,9 +26,7 @@ export const usePayment = defineStore('payment-store', () => { const res = await api.get>('/payment', { params: opts, }); - if (res.status >= 400) return null; - return res.data; } @@ -67,7 +63,7 @@ export const usePayment = defineStore('payment-store', () => { }); export const useReceipt = defineStore('receipt-store', () => { - const data = ref<{}[]>([]); + const data = ref([]); const page = ref(1); const pageMax = ref(1); const pageSize = ref(30); @@ -91,7 +87,6 @@ export const useReceipt = defineStore('receipt-store', () => { }); if (res.status >= 400) return null; - return res.data; } @@ -131,7 +126,6 @@ export const useInvoice = defineStore('invoice-store', () => { }); if (res.status >= 400) return null; - return res.data; }