feat: pages admin + path parsing fixes

This commit is contained in:
Nick
2019-07-02 01:48:19 -04:00
parent 4f968cf230
commit 13f172978f
13 changed files with 454 additions and 45 deletions

View File

@@ -42,6 +42,18 @@ module.exports = {
'createdAt',
'updatedAt'
])
},
async single (obj, args, context, info) {
let page = await WIKI.models.pages.getPageFromDb(args.id)
if (page) {
return {
...page,
locale: page.localeCode,
editor: page.editorKey
}
} else {
throw new WIKI.Error.PageNotFound()
}
}
},
PageMutation: {