fix phoneCode bug
This commit is contained in:
parent
34a44c6691
commit
08bd7da33f
1 changed files with 2 additions and 1 deletions
|
|
@ -149,7 +149,8 @@ function getCustomerWithPhoneCode (req, res, next) {
|
|||
const phone = req.body.phone
|
||||
return pi.getPhoneCode(phone)
|
||||
.then(code => {
|
||||
return customers.get(phone.phone).then(customer => {
|
||||
return customers.get(phone)
|
||||
.then(customer => {
|
||||
if (customer) return respond(req, res, {code, customer})
|
||||
return customers.add(req.body)
|
||||
.then(customer => respond(req, res, {code, customer}))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue