Router updates + unit tests + React
- added -f flag to run unit test command in order to fail fast - pass only id to "$endpoint->get($id)" in React forms instead of array - updated routers according to the ->get($id) change - refactored a bit the way form creation works - added unit tests for Segments router
This commit is contained in:
@ -48,7 +48,7 @@ define(
|
||||
MailPoet.Ajax.post({
|
||||
endpoint: this.props.endpoint,
|
||||
action: 'get',
|
||||
data: { id: id }
|
||||
data: id
|
||||
}).done(function(response) {
|
||||
if(response === false) {
|
||||
this.setState({
|
||||
|
@ -126,7 +126,7 @@ const FormList = React.createClass({
|
||||
action: 'create'
|
||||
}).done(function(response) {
|
||||
if(response !== false) {
|
||||
window.location = response;
|
||||
window.location = mailpoet_form_edit_url + response;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
Reference in New Issue
Block a user