WIPP
This commit is contained in:
parent
bd95a90097
commit
b4d8f3cd4c
4 changed files with 194 additions and 6 deletions
|
|
@ -78,6 +78,12 @@ function poll (req, res, next) {
|
|||
.catch(next)
|
||||
}
|
||||
|
||||
function getTx (req, res, next) {
|
||||
if (req.query.phone) return helpers.fetchPhoneTx(req.query.phone)
|
||||
if (req.query.status) return helpers.fetchStatusTx(req.query.status)
|
||||
throw httpError('Not Found', 404)
|
||||
}
|
||||
|
||||
function postTx (req, res, next) {
|
||||
const pi = plugins(req.settings, req.deviceId)
|
||||
|
||||
|
|
@ -238,6 +244,7 @@ app.post('/verify_transaction', verifyTx)
|
|||
|
||||
app.post('/phone_code', phoneCode)
|
||||
app.post('/tx', postTx)
|
||||
app.get('/tx', getTx)
|
||||
|
||||
app.use(errorHandler)
|
||||
app.use((req, res) => res.status(404).json({err: 'No such route'}))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue