change
This commit is contained in:
13
src/shared/api/partnersSvc.ts
Normal file
13
src/shared/api/partnersSvc.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import {PARTNERS} from "@/shared/constants/apiEndpoints";
|
||||
import {GET} from "@/shared/api/apiClient";
|
||||
import {GetPartnersResponse} from "@/shared/types/partners";
|
||||
|
||||
export const getPartners = async (): Promise<GetPartnersResponse> => {
|
||||
const res = await GET<GetPartnersResponse>(PARTNERS);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
export const getPartnerById = async (id: number): Promise<GetPartnersResponse> => {
|
||||
const res = await GET<GetPartnersResponse>(`${PARTNERS}/${id}`);
|
||||
return res.data;
|
||||
}
|
||||
Reference in New Issue
Block a user