Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show parent page title #14

Merged
merged 4 commits into from
Dec 9, 2018
Merged

Show parent page title #14

merged 4 commits into from
Dec 9, 2018

Conversation

cabad11
Copy link
Contributor

@cabad11 cabad11 commented Dec 7, 2018

Resolves #13

@@ -43,8 +43,10 @@ router.get('/page/:id', async (req, res, next) => {
try {
let page = await Pages.get(pageId);

let parentTitle = (await page.parent).title;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

давай лучше вернем всю родительскую страницу в поле page.parent

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

то есть вернуть весь элемент в переменную?
page.parent и так возвращает промис с родительской страницей

@cabad11 cabad11 changed the title Fix Show parent page title Dec 9, 2018
@cabad11 cabad11 merged commit 9966131 into master Dec 9, 2018
@cabad11 cabad11 deleted the Show-parent-page-title branch December 9, 2018 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants