mirror of
https://github.com/strapi/strapi.git
synced 2025-07-27 19:10:01 +00:00
13 lines
290 B
JavaScript
13 lines
290 B
JavaScript
'use strict';
|
|
|
|
const { map } = require('lodash/fp');
|
|
|
|
const entityToResponseEntity = (entity) => ({ id: entity.id, attributes: entity });
|
|
|
|
const entitiesToResponseEntities = map(entityToResponseEntity);
|
|
|
|
module.exports = () => ({
|
|
entityToResponseEntity,
|
|
entitiesToResponseEntities,
|
|
});
|