mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 10:23:34 +00:00
fix eslint issues
This commit is contained in:
parent
654e65c6ae
commit
8668ba9aea
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
const createEntityService = require('../');
|
||||
const createEntityService = require('..');
|
||||
const entityValidator = require('../../entity-validator');
|
||||
|
||||
describe('Entity service triggers webhooks', () => {
|
||||
@ -12,7 +12,7 @@ describe('Entity service triggers webhooks', () => {
|
||||
};
|
||||
|
||||
let instance;
|
||||
let eventHub = { emit: jest.fn() };
|
||||
const eventHub = { emit: jest.fn() };
|
||||
let entity = { attr: 'value' };
|
||||
|
||||
beforeAll(() => {
|
||||
|
||||
@ -235,10 +235,10 @@ const createDefaultImplementation = ({ strapi, db, eventHub, entityValidator })
|
||||
}
|
||||
|
||||
const deletedEntities = await db.query(uid).deleteMany(query);
|
||||
await Promise.all(entitiesToDelete.map(entity => deleteComponents(uid, entity)));
|
||||
await Promise.all(entitiesToDelete.map((entity) => deleteComponents(uid, entity)));
|
||||
|
||||
// Trigger webhooks. One for each entity
|
||||
await Promise.all(entitiesToDelete.map(entity => this.emitEvent(uid, ENTRY_DELETE, entity)));
|
||||
await Promise.all(entitiesToDelete.map((entity) => this.emitEvent(uid, ENTRY_DELETE, entity)));
|
||||
|
||||
return deletedEntities;
|
||||
},
|
||||
|
||||
@ -198,18 +198,18 @@ module.exports = ({ strapi }) => ({
|
||||
});
|
||||
|
||||
// For performance reasons, all uploads are wrapped in a single Promise.all
|
||||
const uploadThumbnail = async thumbnailFile => {
|
||||
const uploadThumbnail = async (thumbnailFile) => {
|
||||
await getService('provider').upload(thumbnailFile);
|
||||
_.set(fileData, 'formats.thumbnail', thumbnailFile);
|
||||
};
|
||||
|
||||
const uploadResponsiveFormat = async format => {
|
||||
const uploadResponsiveFormat = async (format) => {
|
||||
const { key, file } = format;
|
||||
await getService('provider').upload(file);
|
||||
_.set(fileData, ['formats', key], file);
|
||||
};
|
||||
|
||||
let uploadPromises = [];
|
||||
const uploadPromises = [];
|
||||
|
||||
// Upload image
|
||||
uploadPromises.push(getService('provider').upload(fileData));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user