25 lines
1018 B
JavaScript
25 lines
1018 B
JavaScript
import { collection, get, post, del } from '../helpers/request.ts';
|
|
|
|
const base = 'pages/';
|
|
|
|
export default {
|
|
...collection(base),
|
|
|
|
getAllowedPageTypes: async parent => await get(base + 'getAllowedPageTypes', { params: { parent } }),
|
|
|
|
getPageType: async alias => await get(base + 'getPageType', { params: { alias } }),
|
|
|
|
getEmpty: async (type, parent) => await get(base + 'getEmpty', { params: { type, parent } }),
|
|
|
|
getRevisions: async (id, page) => await get(base + 'getRevisions', { params: { id, page } }),
|
|
|
|
saveSorting: async ids => await post(base + 'saveSorting', ids),
|
|
|
|
move: async (id, destinationId) => await post(base + 'move', { id, destinationId }),
|
|
|
|
copy: async (id, destinationId, includeDescendants) => await post(base + 'copy', { id, destinationId, includeDescendants }),
|
|
|
|
restore: async (id, includeDescendants) => await post(base + 'restore', { id, includeDescendants }),
|
|
|
|
delete: async (id, moveToRecycleBin) => await del(base + 'delete', { params: { id, moveToRecycleBin } }),
|
|
}; |