WIP
This commit is contained in:
parent
594228e871
commit
defb8d0f34
7 changed files with 36 additions and 53 deletions
|
|
@ -95,8 +95,6 @@ function poll (req, res) {
|
|||
}
|
||||
}
|
||||
|
||||
console.log('DEBUG34')
|
||||
|
||||
const response = {
|
||||
err: null,
|
||||
locale,
|
||||
|
|
@ -112,14 +110,10 @@ function poll (req, res) {
|
|||
coins: config.currencies.cryptos
|
||||
}
|
||||
|
||||
console.log('DEBUG35')
|
||||
|
||||
if (response.idVerificationEnabled) {
|
||||
response.idVerificationLimit = config.compliance.idVerificationLimit
|
||||
}
|
||||
|
||||
console.log('DEBUG32')
|
||||
|
||||
res.json(response)
|
||||
})
|
||||
.catch(e => { console.log(e); logger.error(e) })
|
||||
|
|
@ -223,7 +217,7 @@ function verifyTx (req, res) {
|
|||
}
|
||||
|
||||
function ca (req, res) {
|
||||
const token = req.body.token
|
||||
const token = req.query.token
|
||||
|
||||
return pair.authorizeCaDownload(token)
|
||||
.then(valid => {
|
||||
|
|
@ -234,7 +228,7 @@ function ca (req, res) {
|
|||
}
|
||||
|
||||
function pair (req, res) {
|
||||
const token = req.body.token
|
||||
const token = req.query.token
|
||||
const deviceId = getDeviceId(req)
|
||||
|
||||
return pair.pair(token, deviceId)
|
||||
|
|
@ -349,7 +343,7 @@ function init (opts) {
|
|||
const localApp = opts.localApp
|
||||
|
||||
app.post('/pair', pair)
|
||||
app.post('/ca', ca)
|
||||
app.get('/ca', ca)
|
||||
|
||||
app.get('/poll', authMiddleware, poll)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue