Skip to content

Commit

Permalink
Merge branch 'staging'
Browse files Browse the repository at this point in the history
  • Loading branch information
fagundesjg committed Jun 10, 2024
2 parents fc9f33a + 10cf923 commit bcdbaaa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/service/donationOrder/donationOrder.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -16,22 +16,22 @@ const DonationOrderServices = {
);
return data;
},
getAll: async (shelterId: string) => {
getAll: async (shelterId?: string) => {
const { data } = await api.get<
IServerResponse<IPaginatedResponse<IDonateOrderItem>>
IServerResponse<IPaginatedResponse<IDonationsData>>
>('/donation/order', {
params: { shelterId },
});
return data;
},
find: async (id: string) => {
const { data } = await api.get<IServerResponse<IDonateOrderItem>>(
const { data } = await api.get<IServerResponse<IDonationsData>>(
`/donation/order/${id}`
);
return data;
},
update: async (id: string, payload: { status: DonateOrderStatus }) => {
const { data } = await api.put<IServerResponse<IDonateOrderItem>>(
const { data } = await api.put<IServerResponse>(
`/donation/order/${id}`,
payload
);
Expand Down

0 comments on commit bcdbaaa

Please sign in to comment.