Add id-card compliance
This commit is contained in:
parent
fbcb8b5ff2
commit
86dfca60c1
6 changed files with 67 additions and 210 deletions
|
|
@ -177,6 +177,18 @@ function getCustomerWithPhoneCode (req, res, next) {
|
|||
.catch(next)
|
||||
}
|
||||
|
||||
function updateCustomer (req, res, next) {
|
||||
const id = req.params.id
|
||||
const patch = req.body
|
||||
customers.getById(id)
|
||||
.then(customer => {
|
||||
if (!customer) { throw httpError('Not Found', 404)}
|
||||
return customers.update(id, patch)
|
||||
})
|
||||
.then(customer => respond(req, res, {customer}))
|
||||
.catch(next)
|
||||
}
|
||||
|
||||
function getLastSeen (req, res, next) {
|
||||
return logs.getLastSeen(req.deviceId)
|
||||
.then(r => res.json(r))
|
||||
|
|
@ -304,6 +316,8 @@ app.post('/verify_user', verifyUser)
|
|||
app.post('/verify_transaction', verifyTx)
|
||||
|
||||
app.post('/phone_code', getCustomerWithPhoneCode)
|
||||
app.patch('/customer/:id', updateCustomer)
|
||||
|
||||
app.post('/tx', postTx)
|
||||
app.get('/tx/:id', getTx)
|
||||
app.get('/tx', getPhoneTx)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue