Promisify admin-support

This commit is contained in:
goga-m 2017-11-14 17:52:50 +02:00 committed by Josh Harvey
parent e998e84cca
commit 39f9848ca1
3 changed files with 6 additions and 13 deletions

View file

@ -69,15 +69,6 @@ function update (deviceId, logLines) {
* @returns {array} Array of logs for the requested machinej
*/
function getMachineLogs (deviceId, until = new Date().toISOString()) {
const defaults = {
logs: [],
currentMachine: {
name: '',
deviceId: ''
}
}
if (!deviceId) return defaults
const sql = `select id, log_level, timestamp, message from logs
where device_id=$1
and timestamp <= $3