/
githubmirror
/
strapi
Обзор
Документация
Войти
/
githubmirror
/
strapi
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
packages/plugins/graphql/server/src/services/utils/mappers/entity-to-response-entity.ts
14 строк
360 B
Convly
chore: fix build following latest TS type system changes
01 мар 2024, 16:41
01 мар 2024, 16:41
5167af6
Код
Авторство
О чём код?
import { map } from 'lodash/fp'; import type { Data } from '@strapi/types'; const entityToResponseEntity = (entity: { id: Data.ID; [key: keyof any]: unknown }) => ({ id: entity.id, attributes: entity, }); const entitiesToResponseEntities = map(entityToResponseEntity); export default () => ({ entityToResponseEntity, entitiesToResponseEntities, });