refs #4632 changed route from TicketDms to Ticket
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alexandre Riera 2023-03-16 08:24:34 +01:00
parent 4f78eaa14c
commit a99bd2577a
5 changed files with 4 additions and 4 deletions

View File

@ -8,7 +8,7 @@ ALTER TABLE `vn`.`delivery` ADD CONSTRAINT delivery_ticketFk_FK FOREIGN KEY (`ti
DELETE FROM `salix`.`ACL` WHERE `property` = 'saveSign';
INSERT INTO `salix`.`ACL` (`model`,`property`,`accessType`,`permission`,`principalId`)
VALUES
('TicketDms','saveSign','WRITE','ALLOW','employee');
('Ticket','saveSign','WRITE','ALLOW','employee');
DROP PROCEDURE IF EXISTS vn.route_getTickets;

View File

@ -1,6 +1,6 @@
const models = require('vn-loopback/server/server').models;
describe('TicketDms saveSign()', () => {
describe('Ticket saveSign()', () => {
const FormData = require('form-data');
const data = new FormData();
let ctx = {req: {
@ -19,7 +19,7 @@ describe('TicketDms saveSign()', () => {
const options = {transaction: tx};
ctx.args = {tickets: [ticketWithOkState]};
await models.TicketDms.saveSign(ctx, options);
await models.Ticket.saveSign(ctx, options);
await tx.rollback();
} catch (e) {

View File

@ -2,7 +2,6 @@ const UserError = require('vn-loopback/util/user-error');
module.exports = Self => {
require('../methods/ticket-dms/removeFile')(Self);
require('../methods/ticket-dms/saveSign')(Self);
Self.rewriteDbError(function(err) {
if (err.code === 'ER_DUP_ENTRY')

View File

@ -39,4 +39,5 @@ module.exports = function(Self) {
require('../methods/ticket/isRoleAdvanced')(Self);
require('../methods/ticket/collectionLabel')(Self);
require('../methods/ticket/expeditionPalletLabel')(Self);
require('../methods/ticket/saveSign')(Self);
};