fix up crypto services

This commit is contained in:
Josh Harvey 2016-12-09 00:10:18 +02:00
parent e24da06a1b
commit 1b89ed5c76
9 changed files with 82 additions and 46 deletions

View file

@ -1,5 +1,6 @@
const R = require('ramda')
const db = require('./db')
const dbm = require('./postgresql_interface')
const T = require('./time')
const TRANSACTION_EXPIRATION = 2 * T.days
@ -32,4 +33,8 @@ function fetchPhoneTx (phone) {
})
}
module.exports = {stateChange, fetchPhoneTx}
function updateDeviceConfigVersion (versionId) {
return db.none('update devices set user_config_id=$1', [versionId])
}
module.exports = {stateChange, fetchPhoneTx, updateDeviceConfigVersion}