1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-07-19 13:19:42 +02:00

Don't allow to set child element as parent. (#19)

* filter available pages

* refactor

set function as method of Pages

* change wrong word

* change commentaries

* change method name

* refactor

refactor

* Update src/controllers/pages.js

Co-Authored-By: cabad11 <44175180+cabad11@users.noreply.github.com>

* refactor

change comments
change metod name
This commit is contained in:
cabad11 2019-01-14 17:53:10 +03:00 committed by GitHub
parent 9966131100
commit dbfc594e66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 1 deletions

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