This commit is contained in:
parent
ea4190f15c
commit
fa9dfdf411
|
@ -0,0 +1,2 @@
|
||||||
|
INSERT INTO `salix`.`ACL` (`model`,`property`,`accessType`,`permission`,`principalType`,`principalId`)
|
||||||
|
VALUES ('ExpeditionState','addExpeditionState','WRITE','ALLOW','ROLE','delivery');
|
|
@ -17,7 +17,7 @@ module.exports = Self => {
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
http: {
|
http: {
|
||||||
path: `/updateExpeditionState`,
|
path: `/addExpeditionState`,
|
||||||
verb: 'post'
|
verb: 'post'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -52,10 +52,11 @@ module.exports = Self => {
|
||||||
|
|
||||||
const typeFk = result[0].id;
|
const typeFk = result[0].id;
|
||||||
|
|
||||||
const newExpeditionState = await models.Self.create({
|
const newExpeditionState = models.Self.create({
|
||||||
expeditionFk: expedition.expeditionFk,
|
expeditionFk: expedition.expeditionFk,
|
||||||
typeFk,
|
typeFk,
|
||||||
});
|
});
|
||||||
|
promises.push(newExpeditionState);
|
||||||
}
|
}
|
||||||
|
|
||||||
await Promise.all(promises);
|
await Promise.all(promises);
|
|
@ -1,4 +1,4 @@
|
||||||
module.exports = function(Self) {
|
module.exports = function(Self) {
|
||||||
require('../methods/expedition-state/filter')(Self);
|
require('../methods/expedition-state/filter')(Self);
|
||||||
require('../methods/expedition-state/updateExpeditionState')(Self);
|
require('../methods/expedition-state/addExpeditionState')(Self);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue