feat(web): introduce templates
This commit is contained in:
15
packages/web/src/hooks/useAdminCreateTemplate.ee.js
Normal file
15
packages/web/src/hooks/useAdminCreateTemplate.ee.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import { useMutation } from '@tanstack/react-query';
|
||||
|
||||
import api from 'helpers/api';
|
||||
|
||||
export default function useAdminCreateTemplate() {
|
||||
const mutation = useMutation({
|
||||
mutationFn: async ({ flowId, name }) => {
|
||||
const { data } = await api.post(`/v1/admin/templates`, { flowId, name });
|
||||
|
||||
return data;
|
||||
},
|
||||
});
|
||||
|
||||
return mutation;
|
||||
}
|
||||
Reference in New Issue
Block a user