mirror of
https://github.com/Unleash/unleash.git
synced 2025-04-01 01:18:10 +02:00
24 lines
601 B
TypeScript
24 lines
601 B
TypeScript
import useAPI from '../useApi/useApi';
|
|
|
|
export const useReleasePlanTemplatesApi = () => {
|
|
const { makeRequest, makeLightRequest, createRequest, errors, loading } =
|
|
useAPI({
|
|
propagateErrors: true,
|
|
});
|
|
|
|
const deleteReleasePlanTemplate = async (id: string) => {
|
|
const path = `api/admin/release-plan-templates/${id}`;
|
|
const req = createRequest(path, {
|
|
method: 'DELETE',
|
|
});
|
|
|
|
return makeRequest(req.caller, req.id);
|
|
};
|
|
|
|
return {
|
|
deleteReleasePlanTemplate,
|
|
};
|
|
};
|
|
|
|
export default useReleasePlanTemplatesApi;
|