nfp_sites/app/api/page.p.js

20 lines
414 B
JavaScript
Raw Normal View History

const common = require('./common')
2022-06-21 11:50:03 +00:00
const Tree = window.__nfptree && window.__nfptree.tree || []
exports.Tree = Tree
exports.getTree = function() {
return common.sendRequest({
method: 'GET',
2021-02-05 11:50:01 +00:00
url: '/api/pagetree',
})
}
2022-06-28 08:15:51 +00:00
exports.getPage = function(path, page) {
return common.sendRequest({
method: 'GET',
2022-06-28 08:15:51 +00:00
url: '/api/' + (path ? 'pages/' + path : 'frontpage') + '?page=' + (page || 1),
})
}