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:
parent
a2796f55f5
commit
5a96e5ce8e
2 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue