feat: save page

This commit is contained in:
NGPixel
2018-07-22 00:29:39 -04:00
parent c7b675bb1c
commit cb84df7a53
13 changed files with 192 additions and 66 deletions

View File

@@ -325,7 +325,7 @@ module.exports = () => {
// Create root administrator
WIKI.logger.info('Creating root administrator...')
await WIKI.db.users.query().delete().where({
provider: 'local',
providerKey: 'local',
email: req.body.adminEmail
})
await WIKI.db.users.query().insert({
@@ -342,7 +342,7 @@ module.exports = () => {
// Create Guest account
WIKI.logger.info('Creating guest account...')
const guestUsr = await WIKI.db.users.query().findOne({
provider: 'local',
providerKey: 'local',
email: 'guest@example.com'
})
if (!guestUsr) {