mirror of
https://github.com/strapi/strapi.git
synced 2025-07-31 21:09: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 => (
|
||||
attr,
|
||||
data,
|
||||
{ isDraft, model, attributeName, entity }
|
||||
{ isDraft },
|
||||
model,
|
||||
attributeName,
|
||||
entity
|
||||
) => {
|
||||
let validator;
|
||||
|
||||
@ -188,7 +191,10 @@ const createModelValidator = createOrUpdate => (model, data, { isDraft }, entity
|
||||
const validator = createAttributeValidator(createOrUpdate)(
|
||||
model.attributes[attributeName],
|
||||
prop(attributeName, data),
|
||||
{ isDraft, model, attributeName, entity }
|
||||
{ isDraft },
|
||||
model,
|
||||
attributeName,
|
||||
entity
|
||||
);
|
||||
|
||||
return assoc(attributeName, validator)(validators);
|
||||
|
Loading…
x
Reference in New Issue
Block a user