Merge pull request #1201 from josepfo/fix/coinatmradar-400-error
Fix: coinatmradar 400 error
This commit is contained in:
commit
e90904537d
4 changed files with 4 additions and 4 deletions
|
|
@ -69,7 +69,7 @@ function mapMachine (rates, settings, machineRow) {
|
|||
const lastOnline = machineRow.last_online.toISOString()
|
||||
const status = machineRow.stale ? 'online' : 'offline'
|
||||
const showLimitsAndVerification = coinAtmRadar.limitsAndVerification
|
||||
const cashLimit = showLimitsAndVerification ? ( complianceTriggers.getCashLimit(triggers)?.threshold || Infinity ) : null
|
||||
const cashLimit = showLimitsAndVerification ? (_.get('threshold', complianceTriggers.getCashLimit(triggers)) || Infinity) : null
|
||||
const cryptoCurrencies = locale.cryptoCurrencies
|
||||
const identification = mapIdentification(config)
|
||||
const coins = _.map(_.partial(mapCoin, [rates, deviceId, settings]), cryptoCurrencies)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ const { getOperatorId } = require('../operator')
|
|||
|
||||
function findOperatorId (req, res, next) {
|
||||
return getOperatorId('middleware')
|
||||
.then(({ operatorId }) => {
|
||||
.then(operatorId => {
|
||||
res.locals.operatorId = operatorId
|
||||
return next()
|
||||
})
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ const { getOperatorId } = require('../../operator')
|
|||
|
||||
const hostname = options.hostname
|
||||
|
||||
router.use('*', async (req, res, next) => getOperatorId('authentication').then(({ operatorId }) => session({
|
||||
router.use('*', async (req, res, next) => getOperatorId('authentication').then(operatorId => session({
|
||||
store: new PgSession({
|
||||
pgPromise: db,
|
||||
tableName: USER_SESSIONS_TABLE_NAME
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ const _ = require('lodash/fp')
|
|||
function getOperatorId (service) {
|
||||
const sql = `SELECT operator_id FROM operator_ids WHERE service = '${service}'`
|
||||
return db.oneOrNone(sql)
|
||||
.then(_.mapKeys(_.camelCase))
|
||||
.then(_.get('operator_id'))
|
||||
}
|
||||
|
||||
module.exports = { getOperatorId }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue