-
Notifications
You must be signed in to change notification settings - Fork 35
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
Unify the Edit API and Add API forms #368
Comments
Interested in this task. |
@elnzv What is the status of the task? |
Forms are unified now. Working branch: |
@apinf/developers need help here. Here is how I define route Router.route("/api/:_id/edit", function () {
this.render("apiBackendForm", {
data: function () {
var apiBackend = ApiBackends.findOne({_id: this.params._id});
return { apiBackend: apiBackend }
},
waitOn: function() {
return this.subscribe('apiBackend', this.params._id);
}
});
this.layout("masterLayout");
}, {
name: "editApiBackend"
}); |
This is the Edit API route. What does the Add API route look like? On 25 November 2015 10:45:54 EET, illya nizyev notifications@github.com wrote:
Sent from my Android device with K-9 Mail. Please excuse my brevity. |
Router.route("/apibackends", function () {
this.layout("masterLayout");
this.render("apiBackendForm");
}, {
name: "apiBackends"
}); |
I have tested your branch, and am able to create an API Backend. Is the problem with the edit form? |
One bug I notice is that when editing, the redirect after edit goes to |
I have pushed some changes to your branch. The forms seem to be working now. Please verify. |
@brylie, thanks for help! |
There should be no need to maintain two separate instances of the API configuration form. Additionally, this can cause misalignment, if one of the forms gets updated. The forms should be unified with minimal conditional logic to change the form according to current form method (adding or editing).
Definition of done
The text was updated successfully, but these errors were encountered: