feat(actions): add views actions

This commit is contained in:
Aminejv 2022-09-12 12:29:51 +01:00
parent 4fde330cc0
commit 1d798dda54

View File

@ -540,3 +540,17 @@ export const createSurvey = async (data) => {
body: JSON.stringify({ data }),
});
};
export const createView = async (data) => {
return await returnJSON(`/api/views/create`, {
...DEFAULT_OPTIONS,
body: JSON.stringify({ data }),
});
};
export const deleteView = async (data) => {
return await returnJSON(`/api/views/delete`, {
...DEFAULT_OPTIONS,
body: JSON.stringify({ data }),
});
};