feat: API for getting single api service

This commit is contained in:
2025-05-31 17:58:56 +02:00
parent 944c650ab3
commit 485cfc2d12
2 changed files with 32 additions and 0 deletions

View File

@ -44,3 +44,14 @@ export const postApiService = async (
return response.data;
};
export const getApiService = async (id: string): Promise<ApiService> => {
const response = await axios.get<ApiService>(
`/api/v1/admin/api-services/${id}`,
);
if (response.status !== 200 && response.status !== 201)
throw await handleApiError(response);
return response.data;
};