🐛 Fix validators order

This commit is contained in:
Iván Ovejero 2021-04-13 10:38:58 +02:00
parent 9cc122177d
commit be7ec2d3e7
2 changed files with 2 additions and 3 deletions

View file

@ -17,7 +17,6 @@ import {
import { import {
IDeferredPromise, IDeferredPromise,
} from 'n8n-core'; } from 'n8n-core';
import * as PCancelable from 'p-cancelable'; import * as PCancelable from 'p-cancelable';
import { Repository } from 'typeorm'; import { Repository } from 'typeorm';

View file

@ -749,8 +749,8 @@ class App {
TagHelpers.validateRequestBody(req.body); TagHelpers.validateRequestBody(req.body);
const { name } = req.body; const { name } = req.body;
TagHelpers.validateLength(name);
await TagHelpers.validateName(name); await TagHelpers.validateName(name);
TagHelpers.validateLength(name);
const newTag: ITagBase = { const newTag: ITagBase = {
name, name,
@ -776,8 +776,8 @@ class App {
TagHelpers.validateRequestBody(req.body); TagHelpers.validateRequestBody(req.body);
const { name } = req.body; const { name } = req.body;
TagHelpers.validateLength(name);
await TagHelpers.validateName(name); await TagHelpers.validateName(name);
TagHelpers.validateLength(name);
const id = Number(req.params.id); const id = Number(req.params.id);
await TagHelpers.validateId(id); await TagHelpers.validateId(id);