handle idCardPhoto image upload

This commit is contained in:
Fabio Cigliano 2018-08-15 19:27:55 +02:00 committed by Josh Harvey
parent f87d896149
commit afc78d512e
3 changed files with 68 additions and 3 deletions

View file

@ -216,6 +216,7 @@ function updateCustomer (req, res, next) {
const mergedCustomer = _.merge(customer, patch)
return compliance.validationPatch(req.deviceId, config, mergedCustomer)
.then(_.merge(patch))
.then(newPatch => customers.updatePhotoCard(id, newPatch))
.then(newPatch => customers.update(id, newPatch))
})
.then(customer => respond(req, res, {customer}))
@ -328,7 +329,7 @@ const app = express()
const localApp = express()
app.use(helmet({noCache: true}))
app.use(bodyParser.json())
app.use(bodyParser.json({limit: '2mb'}))
app.use(morgan('dev', {skip, stream: logger.stream}))
// These two have their own authorization