From 538e32fbec3ea5333d2ba3f464c1078f691d4657 Mon Sep 17 00:00:00 2001 From: Taranto Date: Sat, 6 Feb 2021 09:34:44 +0000 Subject: [PATCH] fix: bad query on plugins.js --- lib/plugins.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins.js b/lib/plugins.js index 4e5d0baa..b86f76b5 100644 --- a/lib/plugins.js +++ b/lib/plugins.js @@ -270,7 +270,7 @@ function plugins (settings, deviceId) { return Promise.all([ db.none(`insert into machine_pings(device_id, device_time) values($1, $2) ON CONFLICT (device_id) DO UPDATE SET device_time = $2, updated = now()`, [deviceId, deviceTime]), - db.none(pgp.helpers.update(devices, null, 'devices') + `WHERE device_id = ${deviceId}`, { + db.none(pgp.helpers.update(devices, null, 'devices') + 'WHERE device_id = ${deviceId}', { deviceId }) ])