mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-08-08 15:05:26 +02:00
Update pages.js
This commit is contained in:
parent
869d5ca0cc
commit
207d2e556d
1 changed files with 3 additions and 3 deletions
|
@ -47,7 +47,7 @@ class Pages {
|
||||||
* @returns {Promise<Page[]>}
|
* @returns {Promise<Page[]>}
|
||||||
*/
|
*/
|
||||||
static async getAllExceptChildren(parent) {
|
static async getAllExceptChildren(parent) {
|
||||||
let pagesAvailable = this.removeChildren(await Pages.getAll(), parent);
|
const pagesAvailable = this.removeChildren(await Pages.getAll(), parent);
|
||||||
|
|
||||||
return pagesAvailable.filter((item) => item !== null);
|
return pagesAvailable.filter((item) => item !== null);
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,7 @@ class Pages {
|
||||||
if (insertedPage.uri) {
|
if (insertedPage.uri) {
|
||||||
const alias = new Alias({
|
const alias = new Alias({
|
||||||
id: insertedPage._id,
|
id: insertedPage._id,
|
||||||
type: Alias.types.PAGE
|
type: Alias.types.PAGE,
|
||||||
}, insertedPage.uri);
|
}, insertedPage.uri);
|
||||||
|
|
||||||
alias.save();
|
alias.save();
|
||||||
|
@ -158,7 +158,7 @@ class Pages {
|
||||||
if (updatedPage.uri) {
|
if (updatedPage.uri) {
|
||||||
const alias = new Alias({
|
const alias = new Alias({
|
||||||
id: updatedPage._id,
|
id: updatedPage._id,
|
||||||
type: Alias.types.PAGE
|
type: Alias.types.PAGE,
|
||||||
}, updatedPage.uri);
|
}, updatedPage.uri);
|
||||||
|
|
||||||
alias.save();
|
alias.save();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue