diff --git a/src/service/donationOrder/donationOrder.service.ts b/src/service/donationOrder/donationOrder.service.ts index aba23f35..7483e407 100644 --- a/src/service/donationOrder/donationOrder.service.ts +++ b/src/service/donationOrder/donationOrder.service.ts @@ -3,10 +3,10 @@ import { DonateOrderStatus, ICreateDonateResponse, ICreateDonationOrderProps, - IDonateOrderItem, } from './types'; import { IServerResponse } from '@/types'; import { IPaginatedResponse } from '@/hooks/usePaginatedQuery/types'; +import { IDonationsData } from '@/hooks/useDonations/types'; const DonationOrderServices = { store: async (payload: ICreateDonationOrderProps) => { @@ -16,22 +16,22 @@ const DonationOrderServices = { ); return data; }, - getAll: async (shelterId: string) => { + getAll: async (shelterId?: string) => { const { data } = await api.get< - IServerResponse> + IServerResponse> >('/donation/order', { params: { shelterId }, }); return data; }, find: async (id: string) => { - const { data } = await api.get>( + const { data } = await api.get>( `/donation/order/${id}` ); return data; }, update: async (id: string, payload: { status: DonateOrderStatus }) => { - const { data } = await api.put>( + const { data } = await api.put( `/donation/order/${id}`, payload );