fix: system repositories.

This commit is contained in:
a.bouhuolia
2020-12-17 17:19:16 +02:00
parent 7a847fc895
commit a67b1fbdd0
54 changed files with 1452 additions and 983 deletions

View File

@@ -157,7 +157,7 @@ export default class MediaService implements IMediaService {
const mediaIds = Array.isArray(mediaId) ? mediaId : [mediaId];
const tenant = await tenantRepository.getById(tenantId);
const tenant = await tenantRepository.findOneById(tenantId);
const media = await this.getMediaByIdsOrThrowError(tenantId, mediaIds);
const tenantPath = `${publicPath}${tenant.organizationId}`;
@@ -192,7 +192,7 @@ export default class MediaService implements IMediaService {
this.logger.info('[media] trying to upload media.', { tenantId });
const tenant = await tenantRepository.getById(tenantId);
const tenant = await tenantRepository.findOneById(tenantId);
const fileName = `${attachment.md5}.png`;
// Validate the attachment.