1
0
Fork 0
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:
Peter Savchenko 2020-05-09 05:17:57 +03:00
parent 869d5ca0cc
commit 207d2e556d
No known key found for this signature in database
GPG key ID: E68306B1AB0F727C

View file

@ -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();