autoregister raqia
This commit is contained in:
parent
00347c1ff2
commit
b689c5b9c7
1 changed files with 10 additions and 4 deletions
|
|
@ -164,9 +164,15 @@ function pair(req, res) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function registerRaqia(req, res) {
|
function raqia(req, res) {
|
||||||
var raqia = require('./raqia.json');
|
var raqiaCreds;
|
||||||
res.json(raqia);
|
try {
|
||||||
|
var raqiaRec = require('../raqia.json');
|
||||||
|
raqiaCreds = raqiaRec[getFingerprint(req)].apiKeys[0];
|
||||||
|
} catch(ex) {
|
||||||
|
raqiaCreds = null;
|
||||||
|
}
|
||||||
|
res.json(raqiaCreds || {});
|
||||||
}
|
}
|
||||||
|
|
||||||
function init(localConfig) {
|
function init(localConfig) {
|
||||||
|
|
@ -189,7 +195,7 @@ function init(localConfig) {
|
||||||
app.post('/verify_user', authMiddleware, verifyUser);
|
app.post('/verify_user', authMiddleware, verifyUser);
|
||||||
app.post('/verify_transaction', authMiddleware, verifyTx);
|
app.post('/verify_transaction', authMiddleware, verifyTx);
|
||||||
app.post('/pair', pair);
|
app.post('/pair', pair);
|
||||||
app.get('/register_raqia', registerRaqia);
|
app.get('/raqia', raqia);
|
||||||
|
|
||||||
return app;
|
return app;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue