feat(actions): add views actions

This commit is contained in:
Aminejv 2022-09-12 12:29:51 +01:00
parent a5f2a7edb2
commit ffce66e8f8

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 }),
});
};