Commit 22e51c98 authored by Nick's avatar Nick

fix: tags load from editor

parent 5a7fd2d7
......@@ -71,6 +71,9 @@ router.get(['/e', '/e/*'], async (req, res, next) => {
return res.render('unauthorized', { action: 'edit' })
}
await page.$relatedQuery('tags')
page.tags = _.map(page.tags, 'tag')
_.set(res.locals, 'pageMeta.title', `Edit ${page.title}`)
_.set(res.locals, 'pageMeta.description', page.description)
page.mode = 'update'
......
......@@ -12,7 +12,7 @@ block body
path=page.path
title=page.title
description=page.description
tags=page.tags
:tags=page.tags
:is-published=page.isPublished
init-mode=page.mode
init-editor=page.editorKey
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment