feat: tags UI (wip) + save tags from page

This commit is contained in:
Nick
2019-09-01 18:33:36 -04:00
parent 8e80b7471d
commit 5a7fd2d73e
22 changed files with 326 additions and 4 deletions

View File

@@ -210,6 +210,11 @@ module.exports = class Page extends Model {
isPrivate: opts.isPrivate
})
// -> Save Tags
if (opts.tags.length > 0) {
await WIKI.models.tags.associateTags({ tags: opts.tags, page })
}
// -> Render page to HTML
await WIKI.models.pages.renderPage(page)
@@ -260,6 +265,9 @@ module.exports = class Page extends Model {
isPrivate: ogPage.isPrivate
})
// -> Save Tags
await WIKI.models.tags.associateTags({ tags: opts.tags, page })
// -> Render page to HTML
await WIKI.models.pages.renderPage(page)