format for latest standard

This commit is contained in:
Josh Harvey 2018-03-10 18:59:40 +00:00
parent 4108efd9c7
commit c2af183911
77 changed files with 1697 additions and 1693 deletions

View file

@ -17,7 +17,7 @@ function get (id) {
if (!id || _.isEmpty(id)) return Promise.resolve()
const sql = 'select * from support_logs where id=$1'
return db.oneOrNone(sql, [id])
.then(_.mapKeys(_.camelCase))
.then(_.mapKeys(_.camelCase))
}
/**
* Insert a single support_logs row in db
@ -34,7 +34,7 @@ function insert (deviceId) {
const sql = `insert into support_logs
(id, device_id) values ($1, $2) returning *`
return db.one(sql, [uuid.v4(), deviceId])
.then(_.mapKeys(_.camelCase))
.then(_.mapKeys(_.camelCase))
}
/**
@ -52,7 +52,7 @@ function batch () {
where timestamp > (now() - interval '1 week')
order by s.timestamp desc`
return db.any(sql)
.then(_.map(_.mapKeys(_.camelCase)))
.then(_.map(_.mapKeys(_.camelCase)))
}
module.exports = { get, insert, batch }