mirror of
https://github.com/strapi/strapi.git
synced 2025-08-02 05:48:39 +00:00
small refactor for consistency
This commit is contained in:
parent
eddaa42ba6
commit
eca08fc642
@ -149,7 +149,10 @@ const createScalarAttributeValidator = createOrUpdate => (
|
|||||||
const createAttributeValidator = createOrUpdate => (
|
const createAttributeValidator = createOrUpdate => (
|
||||||
attr,
|
attr,
|
||||||
data,
|
data,
|
||||||
{ isDraft, model, attributeName, entity }
|
{ isDraft },
|
||||||
|
model,
|
||||||
|
attributeName,
|
||||||
|
entity
|
||||||
) => {
|
) => {
|
||||||
let validator;
|
let validator;
|
||||||
|
|
||||||
@ -188,7 +191,10 @@ const createModelValidator = createOrUpdate => (model, data, { isDraft }, entity
|
|||||||
const validator = createAttributeValidator(createOrUpdate)(
|
const validator = createAttributeValidator(createOrUpdate)(
|
||||||
model.attributes[attributeName],
|
model.attributes[attributeName],
|
||||||
prop(attributeName, data),
|
prop(attributeName, data),
|
||||||
{ isDraft, model, attributeName, entity }
|
{ isDraft },
|
||||||
|
model,
|
||||||
|
attributeName,
|
||||||
|
entity
|
||||||
);
|
);
|
||||||
|
|
||||||
return assoc(attributeName, validator)(validators);
|
return assoc(attributeName, validator)(validators);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user