#5878 - FiscalData validations #1851

Merged
carlossa merged 58 commits from 5858-fiscalData-validations into dev 2024-02-28 13:53:34 +00:00
2 changed files with 16 additions and 3 deletions
Showing only changes of commit 0ca0ea804c - Show all commits

View File

@ -1,12 +1,13 @@
const UserError = require('../../util/user-error'); const UserError = require('vn-loopback/util/user-error');
const logToConsole = require('strong-error-handler/lib/logger'); const logToConsole = require('strong-error-handler/lib/logger');
const valueIsNot = require('./value-is-not'); const valueIsNot = require('./value-is-not');
const valueInvalid = require('./value-invalid'); const valueInvalid = require('./value-invalid');
const mapMethods = require('vn-loopback/util/map-methods')
const validations = [ const validations = [
valueIsNot, valueIsNot,
valueInvalid valueInvalid,
mapMethods
]; ];
module.exports = function() { module.exports = function() {
return function(err, req, res, next) { return function(err, req, res, next) {

View File

@ -0,0 +1,12 @@
const SLASH = '/';
const MODULES = 'modules';
const BACK = 'back';
const app = require('vn-loopback/server/server');
const modelsMethods = app;
function keyMap(model, local, connector = '_') {
return `${model}${connector}${local}`;
}
module.exports = modelsMethods;