mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-08-07 06:25:21 +02:00
fixed link to parent page
This commit is contained in:
parent
c86c00b463
commit
da6f386687
2 changed files with 2 additions and 2 deletions
|
@ -132,7 +132,7 @@ class Page {
|
|||
*
|
||||
* @returns {Promise<Page>}
|
||||
*/
|
||||
public async getParent(): Promise<Page|null> {
|
||||
public async getParent(): Promise<Page> {
|
||||
const data = await pagesDb.findOne({ _id: this._parent });
|
||||
|
||||
return new Page(data);
|
||||
|
|
|
@ -30,7 +30,7 @@ router.get('*', verifyToken, async (req: Request, res: Response) => {
|
|||
case Alias.types.PAGE: {
|
||||
const page = await Pages.get(alias.id);
|
||||
|
||||
const pageParent = page.parent;
|
||||
const pageParent = await page.getParent();
|
||||
|
||||
res.render('pages/page', {
|
||||
page,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue