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,
|
||||
isScalarAttribute,
|
||||
getNonVisibleAttributes,
|
||||
getNonWritableAttributes,
|
||||
getWritableAttributes,
|
||||
} = contentTypes;
|
||||
const {
|
||||
@ -241,14 +240,12 @@ module.exports = ({ action, ability, model }) => {
|
||||
};
|
||||
|
||||
const getOutputFields = (fields = []) => {
|
||||
const nonWritableAttributes = getNonWritableAttributes(schema);
|
||||
const nonVisibleAttributes = getNonVisibleAttributes(schema);
|
||||
|
||||
return uniq([
|
||||
...fields,
|
||||
...STATIC_FIELDS,
|
||||
...COMPONENT_FIELDS,
|
||||
...nonWritableAttributes,
|
||||
...nonVisibleAttributes,
|
||||
CREATED_AT_ATTRIBUTE,
|
||||
UPDATED_AT_ATTRIBUTE,
|
||||
|
Loading…
x
Reference in New Issue
Block a user