1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-08-08 15:05:26 +02:00

change method name

This commit is contained in:
cabad 2018-12-28 21:37:57 +04:00
parent a2796f55f5
commit 5a96e5ce8e
2 changed files with 2 additions and 2 deletions

View file

@ -48,7 +48,7 @@ class Pages {
* @param {string} parent - id of current page
* @returns {Promise<Page[]>}
*/
static async getWithoutChildren(parent) {
static async getAllExceptChildrends(parent) {
let pagesAvailable = this.removeChildren(await Pages.getAll(), parent);
return pagesAvailable.filter((item) => item !== null);

View file

@ -22,7 +22,7 @@ router.get('/page/edit/:id', async (req, res, next) => {
try {
let page = await Pages.get(pageId);
let pagesAvailable = await Pages.getWithoutChildren(pageId);
let pagesAvailable = await Pages.getAllExceptChildrends(pageId);
res.render('pages/form', {
pagesAvailable,