fix: objection.js 2.0 compat fixes

This commit is contained in:
NGPixel
2020-01-26 13:11:33 -05:00
parent 8f5265622f
commit da86d8ccf7
2 changed files with 10 additions and 10 deletions

View File

@@ -362,16 +362,16 @@ module.exports = {
return process.cwd()
},
async groupsTotal () {
const total = await WIKI.models.groups.query().count('* as total').first().pluck('total')
return _.toSafeInteger(total)
const total = await WIKI.models.groups.query().count('* as total').first()
return _.toSafeInteger(total.total)
},
async pagesTotal () {
const total = await WIKI.models.pages.query().count('* as total').first().pluck('total')
return _.toSafeInteger(total)
const total = await WIKI.models.pages.query().count('* as total').first()
return _.toSafeInteger(total.total)
},
async usersTotal () {
const total = await WIKI.models.users.query().count('* as total').first().pluck('total')
return _.toSafeInteger(total)
const total = await WIKI.models.users.query().count('* as total').first()
return _.toSafeInteger(total.total)
}
}
}