Skip to content

Commit

Permalink
fix(core): Allow custom host id when creating new entity with orderab…
Browse files Browse the repository at this point in the history
…le assets (#1035)

closes #1034
  • Loading branch information
simpian authored Aug 18, 2021
1 parent 03cd5d7 commit aeaf308
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/core/src/service/services/asset.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ import { TransactionalConnection } from '../transaction/transactional-connection
import { ChannelService } from './channel.service';
import { RoleService } from './role.service';
import { TagService } from './tag.service';

import { camelCase } from 'typeorm/util/StringUtils';

// tslint:disable-next-line:no-var-requires
const sizeOf = require('image-size');

Expand Down Expand Up @@ -565,8 +568,8 @@ export class AssetService {
case 'Collection':
return 'collectionId';
default:
throw new InternalServerError('error.could-not-find-matching-orderable-asset');
}
return `${camelCase(entityName, true)}Id`;
}
}

private validateMimeType(mimeType: string): boolean {
Expand Down

0 comments on commit aeaf308

Please sign in to comment.