mirror of
https://github.com/fspc/BikeShed-1.git
synced 2025-02-28 16:53:23 -05:00
Redirect correctly after creating a bike
This commit is contained in:
parent
64e907b6f7
commit
b1ddcfb867
@ -21,7 +21,7 @@ $("#add_bike_submit").click(function(){
|
|||||||
contentType: 'application/json',
|
contentType: 'application/json',
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(data, status, xhr){
|
success: function(data, status, xhr){
|
||||||
window.location = data.bikes[0].href;
|
window.location = data.bikes[0].id;
|
||||||
},
|
},
|
||||||
error: function(data, status ){
|
error: function(data, status ){
|
||||||
displayFormErrors(data.responseJSON);
|
displayFormErrors(data.responseJSON);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user