-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat(context): export function to concat the binding key and path #820
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
Conversation
|
Can one of the admins verify this patch? |
packages/context/src/binding.ts
Outdated
| * @param path the path | ||
| * | ||
| */ | ||
| static concatKeyAndPath(key: string, path: string) { |
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.
Maybe it's better to name the method as buildKeyWithPath.
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.
Can you refactor some tests to use this method?
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.
@truongminh Ping. Did you see my comments here?
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.
Sorry for my slow response.
I will refactor the code and write some tests for this feature tomorrow.
b-admike
left a comment
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.
LGTM
|
@truongminh Thank you for the contribution! |
Description
The current rest config key
RestBinding.CONFIGinpackages/rest/keys.tsis defined as${CoreBindings.APPLICATION_CONFIG}#rest.It is safer to use an exported function from
context/bindingwhere both the concatenation and split are implemented.The new key is
export const CONFIG = Binding.concatKeyAndPath (CoreBindings.APPLICATION_CONFIG, rest)