feat: api service fetch by client id api
This commit is contained in:
@ -56,6 +56,19 @@ export const getApiService = async (id: string): Promise<ApiService> => {
|
||||
return response.data;
|
||||
};
|
||||
|
||||
export const getApiServiceCID = async (
|
||||
clientId: string,
|
||||
): Promise<ApiService> => {
|
||||
const response = await axios.get<ApiService>(
|
||||
`/api/v1/admin/api-services/client/${clientId}`,
|
||||
);
|
||||
|
||||
if (response.status !== 200 && response.status !== 201)
|
||||
throw await handleApiError(response);
|
||||
|
||||
return response.data;
|
||||
};
|
||||
|
||||
export const patchToggleApiService = async (id: string): Promise<void> => {
|
||||
const response = await axios.patch(`/api/v1/admin/api-services/toggle/${id}`);
|
||||
|
||||
|
Reference in New Issue
Block a user