-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow custom host id when creating new entity for orderable assets #1035
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the issue & fix. See my comment re the try-catch block.
default: | ||
return `${camelCase(entityName, true)}Id`; | ||
} | ||
} catch (error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This try-catch block is redundant, since there is no possibility of an error being thrown from the switch statement. You can omit this and just use the switch statement instead.
👍 |
@@ -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`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@michaelbromley I accidentally added true flag in this function, can you please remove true flag that will actually turn the first letter capital making this Title case instead of camelCase,
sorry for the inconvenience, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in v1.1.5
closes #1034