-
Notifications
You must be signed in to change notification settings - Fork 17
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
Feature/new oauth server name #108
Conversation
@@ -61,6 +176,29 @@ const oAuthServerSchema = { | |||
preserve_host: false, | |||
listen_path: '', | |||
upstream_url: '', | |||
upstreams: { |
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.
If all upstreams
schemas has the same structure we could declare one and reuse over the code, so we don't repeat
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.
totally agree, but here is one but:
in future, this schema, probably, will come from the server side...
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.
gotcha!
@@ -31,6 +31,8 @@ class CorsPlugin extends PureComponent { | |||
render() { | |||
const { apiSchema, className, edit, name, handlePluginExclude, plugin, pluginName } = this.props; | |||
const b = block(className); | |||
console.error('nem_____', name); |
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.
🙈
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.
my bad 🥊
this.props.saveOAuthServer(this.props.location.pathname, values); | ||
const transformedValues = transformFormValues(values, true); | ||
|
||
this.props.saveOAuthServer(this.props.location.pathname, transformedValues); |
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.
function composition would be possible here too, if parameter order does not fit we could reorder it
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.
In this case, it would be a bit harder then it looks like at first. I'll investigate and make separate PR related to this case.
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.
Issue: #110
const createOptions = (list1, list2) => { | ||
const combinedListOfUnitsAndLabels = R.zip(list1, list2); | ||
|
||
return combinedListOfUnitsAndLabels.map(item => ({ |
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.
const asLabelValue = item => ({ label: item[1], value: item[0] })
return R.zip(list1, list2).map(asLabelValue)
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.
Again my bad... this code is redundant here... 🔫
const createOptions = (list1, list2) => { | ||
const combinedListOfUnitsAndLabels = R.zip(list1, list2); | ||
|
||
return combinedListOfUnitsAndLabels.map(item => ({ |
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.
same as line 96
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.
the same 😞
👍 |
No description provided.