Add *override_by fields in customer
This commit is contained in:
parent
e351d1b495
commit
89eb617a4a
3 changed files with 39 additions and 3 deletions
|
|
@ -194,7 +194,8 @@ app.get('/api/customer/:id', (req, res, next) => {
|
|||
*/
|
||||
app.patch('/api/customer/:id', (req, res, next) => {
|
||||
if (!req.params.id) return res.status(400).send({Error: 'Requires id'})
|
||||
return customers.update(req.params.id, req.query)
|
||||
const token = req.token || req.cookies.token
|
||||
return customers.update(req.params.id, req.query, token)
|
||||
.then(r => res.send(r))
|
||||
.catch(() => res.status(404).send({Error: 'Not found'}))
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue