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[]>}
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ class Pages {
|
|||
if (insertedPage.uri) {
|
||||
const alias = new Alias({
|
||||
id: insertedPage._id,
|
||||
type: Alias.types.PAGE
|
||||
type: Alias.types.PAGE,
|
||||
}, insertedPage.uri);
|
||||
|
||||
alias.save();
|
||||
|
@ -158,7 +158,7 @@ class Pages {
|
|||
if (updatedPage.uri) {
|
||||
const alias = new Alias({
|
||||
id: updatedPage._id,
|
||||
type: Alias.types.PAGE
|
||||
type: Alias.types.PAGE,
|
||||
}, updatedPage.uri);
|
||||
|
||||
alias.save();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue