refs #4632 changed route from TicketDms to Ticket
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
4f78eaa14c
commit
a99bd2577a
|
@ -8,7 +8,7 @@ ALTER TABLE `vn`.`delivery` ADD CONSTRAINT delivery_ticketFk_FK FOREIGN KEY (`ti
|
||||||
DELETE FROM `salix`.`ACL` WHERE `property` = 'saveSign';
|
DELETE FROM `salix`.`ACL` WHERE `property` = 'saveSign';
|
||||||
INSERT INTO `salix`.`ACL` (`model`,`property`,`accessType`,`permission`,`principalId`)
|
INSERT INTO `salix`.`ACL` (`model`,`property`,`accessType`,`permission`,`principalId`)
|
||||||
VALUES
|
VALUES
|
||||||
('TicketDms','saveSign','WRITE','ALLOW','employee');
|
('Ticket','saveSign','WRITE','ALLOW','employee');
|
||||||
|
|
||||||
DROP PROCEDURE IF EXISTS vn.route_getTickets;
|
DROP PROCEDURE IF EXISTS vn.route_getTickets;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
const models = require('vn-loopback/server/server').models;
|
const models = require('vn-loopback/server/server').models;
|
||||||
|
|
||||||
describe('TicketDms saveSign()', () => {
|
describe('Ticket saveSign()', () => {
|
||||||
const FormData = require('form-data');
|
const FormData = require('form-data');
|
||||||
const data = new FormData();
|
const data = new FormData();
|
||||||
let ctx = {req: {
|
let ctx = {req: {
|
||||||
|
@ -19,7 +19,7 @@ describe('TicketDms saveSign()', () => {
|
||||||
const options = {transaction: tx};
|
const options = {transaction: tx};
|
||||||
ctx.args = {tickets: [ticketWithOkState]};
|
ctx.args = {tickets: [ticketWithOkState]};
|
||||||
|
|
||||||
await models.TicketDms.saveSign(ctx, options);
|
await models.Ticket.saveSign(ctx, options);
|
||||||
|
|
||||||
await tx.rollback();
|
await tx.rollback();
|
||||||
} catch (e) {
|
} catch (e) {
|
|
@ -2,7 +2,6 @@ const UserError = require('vn-loopback/util/user-error');
|
||||||
|
|
||||||
module.exports = Self => {
|
module.exports = Self => {
|
||||||
require('../methods/ticket-dms/removeFile')(Self);
|
require('../methods/ticket-dms/removeFile')(Self);
|
||||||
require('../methods/ticket-dms/saveSign')(Self);
|
|
||||||
|
|
||||||
Self.rewriteDbError(function(err) {
|
Self.rewriteDbError(function(err) {
|
||||||
if (err.code === 'ER_DUP_ENTRY')
|
if (err.code === 'ER_DUP_ENTRY')
|
||||||
|
|
|
@ -39,4 +39,5 @@ module.exports = function(Self) {
|
||||||
require('../methods/ticket/isRoleAdvanced')(Self);
|
require('../methods/ticket/isRoleAdvanced')(Self);
|
||||||
require('../methods/ticket/collectionLabel')(Self);
|
require('../methods/ticket/collectionLabel')(Self);
|
||||||
require('../methods/ticket/expeditionPalletLabel')(Self);
|
require('../methods/ticket/expeditionPalletLabel')(Self);
|
||||||
|
require('../methods/ticket/saveSign')(Self);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue