Файловый менеджер - Редактировать - /home/freeclou/app.optimyar.com/backend/.cache/admin/src/utils/getAttributesToDisplay.js
Назад
import { get } from 'lodash'; const getAttributesToDisplay = contentType => { const timestamps = get(contentType, ['options', 'timestamps']); // Sometimes timestamps is false let timestampsArray = Array.isArray(timestamps) ? timestamps : []; const idsAttributes = ['id', '_id']; // For both SQL and mongo const unwritableAttributes = [...idsAttributes, ...timestampsArray, 'published_at']; const schemaAttributes = get(contentType, ['attributes'], {}); return Object.keys(schemaAttributes).reduce((acc, current) => { if (!unwritableAttributes.includes(current)) { acc.push({ ...schemaAttributes[current], attributeName: current }); } return acc; }, []); }; export default getAttributesToDisplay;
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка