mirror of
https://github.com/strapi/strapi.git
synced 2025-09-23 07:22:51 +00:00
don't return non writtable attrs on snaitized outpud because they are already handled
This commit is contained in:
parent
5428f2a455
commit
d0acdba51c
@ -27,7 +27,6 @@ const {
|
|||||||
constants,
|
constants,
|
||||||
isScalarAttribute,
|
isScalarAttribute,
|
||||||
getNonVisibleAttributes,
|
getNonVisibleAttributes,
|
||||||
getNonWritableAttributes,
|
|
||||||
getWritableAttributes,
|
getWritableAttributes,
|
||||||
} = contentTypes;
|
} = contentTypes;
|
||||||
const {
|
const {
|
||||||
@ -241,14 +240,12 @@ module.exports = ({ action, ability, model }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getOutputFields = (fields = []) => {
|
const getOutputFields = (fields = []) => {
|
||||||
const nonWritableAttributes = getNonWritableAttributes(schema);
|
|
||||||
const nonVisibleAttributes = getNonVisibleAttributes(schema);
|
const nonVisibleAttributes = getNonVisibleAttributes(schema);
|
||||||
|
|
||||||
return uniq([
|
return uniq([
|
||||||
...fields,
|
...fields,
|
||||||
...STATIC_FIELDS,
|
...STATIC_FIELDS,
|
||||||
...COMPONENT_FIELDS,
|
...COMPONENT_FIELDS,
|
||||||
...nonWritableAttributes,
|
|
||||||
...nonVisibleAttributes,
|
...nonVisibleAttributes,
|
||||||
CREATED_AT_ATTRIBUTE,
|
CREATED_AT_ATTRIBUTE,
|
||||||
UPDATED_AT_ATTRIBUTE,
|
UPDATED_AT_ATTRIBUTE,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user