implement confirmation sms, bug fixes
This commit is contained in:
parent
380f47082e
commit
014033b73e
5 changed files with 134 additions and 18 deletions
|
|
@ -242,6 +242,15 @@ function fetchPhoneTx (req, res) {
|
|||
})
|
||||
}
|
||||
|
||||
function registerRedeem (req, res) {
|
||||
return plugins.registerRedeem(session(req))
|
||||
.then(r => res.json())
|
||||
.catch(err => {
|
||||
logger.error(err)
|
||||
res.send(500)
|
||||
})
|
||||
}
|
||||
|
||||
function waitForDispense (req, res) {
|
||||
return plugins.fetchTx(session(req))
|
||||
.then(tx => {
|
||||
|
|
@ -292,6 +301,7 @@ function init (localConfig) {
|
|||
app.post('/phone_code', authMiddleware, phoneCode)
|
||||
app.post('/update_phone', authMiddleware, updatePhone)
|
||||
app.get('/phone_tx', authMiddleware, fetchPhoneTx)
|
||||
app.post('/register_redeem', authMiddleware, registerRedeem)
|
||||
app.get('/await_dispense', authMiddleware, waitForDispense)
|
||||
app.post('/dispense', authMiddleware, dispense)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue