This commit is contained in:
parent
d9339af87e
commit
c0089b1fa0
|
@ -1,8 +1,6 @@
|
|||
const UserError = require('vn-loopback/util/user-error');
|
||||
|
||||
module.exports = Self => {
|
||||
Self.remoteMethodCtx('saveCmr', {
|
||||
description: 'Save sign',
|
||||
description: 'Save cmr',
|
||||
accessType: 'WRITE',
|
||||
accepts:
|
||||
[
|
||||
|
@ -34,8 +32,8 @@ module.exports = Self => {
|
|||
|
||||
try {
|
||||
for (const ticketId of tickets) {
|
||||
const cmrFk = await models.Ticket.findOne(
|
||||
{where: {id: ticketId},
|
||||
const cmrFk = await models.Ticket.findOne({
|
||||
where: {id: ticketId},
|
||||
fields: ['cmrFk']
|
||||
}, myOptions);
|
||||
|
||||
|
|
|
@ -63,6 +63,9 @@
|
|||
},
|
||||
"weight": {
|
||||
"type": "number"
|
||||
},
|
||||
"cmrFk": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
|
|
Loading…
Reference in New Issue