fix: query and function name
This commit is contained in:
parent
8f264e25b0
commit
772805269f
1 changed files with 4 additions and 4 deletions
|
|
@ -190,9 +190,9 @@ function plugins (settings, deviceId) {
|
||||||
.then(row => row.id)
|
.then(row => row.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
function fetchCurrentAvailableCoupons () {
|
function getNumberOfAvailableCoupons () {
|
||||||
const sql = `SELECT * FROM coupons WHERE soft_deleted=false`
|
const sql = `SELECT COUNT(id) FROM coupons WHERE soft_deleted=false`
|
||||||
return db.any(sql).then(v => v.length)
|
return db.one(sql).then(res => res.count)
|
||||||
}
|
}
|
||||||
|
|
||||||
function mapCoinSettings (coinParams) {
|
function mapCoinSettings (coinParams) {
|
||||||
|
|
@ -227,7 +227,7 @@ function plugins (settings, deviceId) {
|
||||||
const testnetPromises = cryptoCodes.map(c => wallet.cryptoNetwork(settings, c))
|
const testnetPromises = cryptoCodes.map(c => wallet.cryptoNetwork(settings, c))
|
||||||
const pingPromise = recordPing(deviceTime, machineVersion, machineModel)
|
const pingPromise = recordPing(deviceTime, machineVersion, machineModel)
|
||||||
const currentConfigVersionPromise = fetchCurrentConfigVersion()
|
const currentConfigVersionPromise = fetchCurrentConfigVersion()
|
||||||
const currentAvailableCoupons = fetchCurrentAvailableCoupons()
|
const currentAvailableCoupons = getNumberOfAvailableCoupons()
|
||||||
|
|
||||||
const promises = [
|
const promises = [
|
||||||
buildAvailableCassettes(),
|
buildAvailableCassettes(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue