#5878 - FiscalData validations #1851

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

View File

@ -16,7 +16,7 @@ const validations = [{
module = module.substring(0, module.length - 1); module = module.substring(0, module.length - 1);
model = models[module]; model = models[module];
} }
if (!model) throw new UserError(''); if (!model) throw new Error('No matching model found');
const {accepts} = model.sharedClass.methods().find(method => method.name === path); const {accepts} = model.sharedClass.methods().find(method => method.name === path);
for (const [key, value] of Object.entries(body)) { for (const [key, value] of Object.entries(body)) {
const accept = accepts.find(acc => acc.arg === key); const accept = accepts.find(acc => acc.arg === key);