fix: objection.js 2.0 compat fixes
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user