mirror of
https://github.com/strapi/strapi.git
synced 2025-12-27 15:13:21 +00:00
fix conflicts
This commit is contained in:
parent
f159f150f2
commit
bbafe2b01d
@ -87,16 +87,18 @@ module.exports = ({ strapi }) => ({
|
||||
const params = { ...opts, populate: getDeepPopulate(uid) };
|
||||
|
||||
const entities = await strapi.entityService.findMany(uid, params);
|
||||
await mapAsync(entities.results, async (entity) => this.mapEntity(entity, uid));
|
||||
return entities;
|
||||
|
||||
const mappedResults = await mapAsync(entities.results, (entity) => this.mapEntity(entity, uid));
|
||||
return { ...entities, results: mappedResults };
|
||||
},
|
||||
|
||||
async findPage(opts, uid) {
|
||||
const params = { ...opts, populate: getDeepPopulate(uid, { maxLevel: 1 }) };
|
||||
|
||||
const entities = await strapi.entityService.findPage(uid, params);
|
||||
await mapAsync(entities.results, async (entity) => this.mapEntity(entity, uid));
|
||||
return entities;
|
||||
|
||||
const mappedResults = await mapAsync(entities.results, (entity) => this.mapEntity(entity, uid));
|
||||
return { ...entities, results: mappedResults };
|
||||
},
|
||||
|
||||
async findWithRelationCountsPage(opts, uid) {
|
||||
@ -104,19 +106,17 @@ module.exports = ({ strapi }) => ({
|
||||
const params = { ...opts, populate: addCreatedByRolesPopulate(counterPopulate) };
|
||||
|
||||
const entities = await strapi.entityService.findWithRelationCountsPage(uid, params);
|
||||
await mapAsync(entities.results, async (entity) => this.mapEntity(entity, uid));
|
||||
|
||||
return entities;
|
||||
const mappedResults = await mapAsync(entities.results, (entity) => this.mapEntity(entity, uid));
|
||||
return { ...entities, results: mappedResults };
|
||||
},
|
||||
|
||||
async findOneWithCreatorRolesAndCount(id, uid) {
|
||||
const counterPopulate = getDeepPopulate(uid, { countMany: true, countOne: true });
|
||||
const params = { populate: addCreatedByRolesPopulate(counterPopulate) };
|
||||
|
||||
const entities = await strapi.entityService.findOne(uid, id, params);
|
||||
await mapAsync(entities.results, async (entity) => this.mapEntity(entity, uid));
|
||||
|
||||
return entities;
|
||||
const entity = await strapi.entityService.findOne(uid, id, params);
|
||||
return this.mapEntity(entity, uid);
|
||||
},
|
||||
|
||||
async findOne(id, uid) {
|
||||
|
||||
@ -71,8 +71,6 @@ const addSignedFileUrlsToAdmin = () => {
|
||||
// Make an impact analysis of this feature
|
||||
// - What about the webhooks emitted by the entity manager?
|
||||
// - Do we want to sign the file urls in the event payload?
|
||||
// Test for every case in the Content manager so we don't miss any
|
||||
// Can we simplify the way to extend the content manager?
|
||||
// Documentation
|
||||
strapi.container
|
||||
.get('services')
|
||||
@ -83,7 +81,7 @@ const addSignedFileUrlsToAdmin = () => {
|
||||
* @param {string} uid
|
||||
* @returns
|
||||
*/
|
||||
const mapEntity = async (entity, uid) => signEntityMedia(entity, uid);
|
||||
const mapEntity = (entity, uid) => signEntityMedia(entity, uid);
|
||||
|
||||
return { ...entityManager, mapEntity };
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user