1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-08-08 06:55:26 +02:00
change comments
change metod name
This commit is contained in:
cabad 2018-12-30 12:34:43 +04:00
parent c053e2ac0a
commit 16810f1b8b
2 changed files with 4 additions and 4 deletions

View file

@ -43,12 +43,12 @@ class Pages {
/**
* @static
* Return all pages without children pages
* Return all pages without children of passed page
*
* @param {string} parent - id of current page
* @returns {Promise<Page[]>}
*/
static async getAllExceptChildrends(parent) {
static async getAllExceptChildrens(parent) {
let pagesAvailable = this.removeChildren(await Pages.getAll(), parent);
return pagesAvailable.filter((item) => item !== null);
@ -58,7 +58,7 @@ class Pages {
* @static
* Set all children elements to null
*
* @param {Array<?Page>} pagesAvailable - Array of all pages
* @param {Page[]} [pagesAvailable] - Array of all pages
* @param {string} parent - id of parent page
* @returns {Array<?Page>}
*/

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.getAllExceptChildrends(pageId);
let pagesAvailable = await Pages.getAllExceptChildrens(pageId);
res.render('pages/form', {
pagesAvailable,