refs #5878 feat mapMethods approach
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Javier Segarra 2024-01-15 10:51:24 +01:00
parent e68eb017aa
commit 0ca0ea804c
2 changed files with 16 additions and 3 deletions

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 valueIsNot = require('./value-is-not');
const valueInvalid = require('./value-invalid');
const mapMethods = require('vn-loopback/util/map-methods')
const validations = [
valueIsNot,
valueInvalid
valueInvalid,
mapMethods
];
module.exports = function() {
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;