Files
mixtape/zero.Backoffice.UI/old_app/api/pages.js
T

29 lines
1.2 KiB
JavaScript
Raw Normal View History

import { collection, get, post, del } from '../helpers/request.ts';
2020-05-19 15:53:01 +02:00
const base = 'pages/';
export default {
...collection(base),
2020-05-19 15:53:01 +02:00
getAllowedPageTypes: async parent => await get(base + 'getAllowedPageTypes', { params: { parent } }),
2020-05-19 15:53:01 +02:00
getPageType: async alias => await get(base + 'getPageType', { params: { alias } }),
2020-07-08 13:59:46 +02:00
getChildren: async (parent, active, search) => await get(base + 'getChildren', { params: { parent, active, search } }),
2021-10-11 13:58:14 +02:00
getUrls: async id => await get(base + 'getUrls', { params: { pageId: id } }),
getEmpty: async (type, parent) => await get(base + 'getEmptyByType', { params: { type, parent } }),
2020-05-19 15:53:01 +02:00
getRevisions: async (id, page) => await get(base + 'getRevisions', { params: { id, page } }),
2020-05-19 15:53:01 +02:00
saveSorting: async ids => await post(base + 'saveSorting', ids),
2020-10-29 21:44:22 +01:00
move: async (id, destinationId) => await post(base + 'move', { id, destinationId }),
copy: async (id, destinationId, includeDescendants) => await post(base + 'copy', { id, destinationId, includeDescendants }),
2020-05-19 15:53:01 +02:00
restore: async (id, includeDescendants) => await post(base + 'restore', { id, includeDescendants }),
2020-05-19 15:53:01 +02:00
2020-11-20 15:17:41 +01:00
delete: async (id, moveToRecycleBin) => await del(base + 'delete', { params: { id, moveToRecycleBin } }),
2020-05-19 15:53:01 +02:00
};