chore: undo $ prepend on queries

This commit is contained in:
Taranto 2021-07-22 11:06:39 +01:00 committed by Josh Harvey
parent f3f2bb01b0
commit ba4117173e
50 changed files with 215 additions and 227 deletions

View file

@ -20,7 +20,7 @@ function machinesLastPing () {
from machine_events
group by device_id`
return Promise.all([machineLoader.getMachineNames(), db.$any(sql)])
return Promise.all([machineLoader.getMachineNames(), db.any(sql)])
.then(([machines, events]) => {
if (machines.length === 0) return 'No paired machines'
@ -52,7 +52,7 @@ function status () {
order by created desc
limit 1`
return Promise.all([checkWasConfigured(), db.$oneOrNone(sql, ['ping']), machinesLastPing()])
return Promise.all([checkWasConfigured(), db.oneOrNone(sql, ['ping']), machinesLastPing()])
.then(([wasConfigured, statusRow, machineStatus]) => {
const age = statusRow && moment.duration(statusRow.age, 'seconds')
const up = statusRow ? statusRow.age < CONSIDERED_UP_SECS : false