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