Skip to content

Commit

Permalink
fix(core): Correct camel casing for custom orderable asset ids
Browse files Browse the repository at this point in the history
Relates to #1035
  • Loading branch information
michaelbromley committed Aug 19, 2021
1 parent 63ad437 commit cd18431
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/core/src/service/services/asset.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { ReadStream } from 'fs-extra';
import mime from 'mime-types';
import path from 'path';
import { Readable, Stream } from 'stream';
import { camelCase } from 'typeorm/util/StringUtils';

import { RequestContext } from '../../api/common/request-context';
import { isGraphQlErrorResult } from '../../common/error/error-result';
Expand Down Expand Up @@ -46,8 +47,6 @@ 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 @@ -568,8 +567,8 @@ export class AssetService {
case 'Collection':
return 'collectionId';
default:
return `${camelCase(entityName, true)}Id`;
}
return `${camelCase(entityName)}Id`;
}
}

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

0 comments on commit cd18431

Please sign in to comment.