log in ticketUpdate
This commit is contained in:
parent
7c1a13cca8
commit
2fdd275085
|
@ -1,4 +1,5 @@
|
|||
const UserError = require('vn-loopback/util/user-error');
|
||||
const diff = require('object-diff');
|
||||
|
||||
module.exports = Self => {
|
||||
Self.remoteMethodCtx('componentUpdate', {
|
||||
|
@ -87,9 +88,13 @@ module.exports = Self => {
|
|||
if (!zoneShipped || zoneShipped.zoneFk != zoneId)
|
||||
throw new UserError(`You don't have privileges to change the zone`);
|
||||
}
|
||||
|
||||
const originalTicket = await models.Ticket.findById(id);
|
||||
const properties = Object.assign({}, ctx.args);
|
||||
delete properties.ctx;
|
||||
delete properties.option;
|
||||
// Force unroute
|
||||
const hasToBeUnrouted = true;
|
||||
console.log('args', originalTicket);
|
||||
let query = 'CALL vn.ticket_componentMakeUpdate(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';
|
||||
let res = await Self.rawSql(query, [
|
||||
id,
|
||||
|
|
Loading…
Reference in New Issue