format for latest standard
This commit is contained in:
parent
4108efd9c7
commit
c2af183911
77 changed files with 1697 additions and 1693 deletions
|
|
@ -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 }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue