Lessons should use POST
This commit is contained in:
parent
2470be7387
commit
4133089d09
@ -27,7 +27,7 @@ define(['jquery',
|
|||||||
var options = {
|
var options = {
|
||||||
success:this.reLoadView.bind(this),
|
success:this.reLoadView.bind(this),
|
||||||
url: this.model.urlRoot,
|
url: this.model.urlRoot,
|
||||||
type:'GET'
|
type:'POST'
|
||||||
// $.ajax options can be used here too, for example:
|
// $.ajax options can be used here too, for example:
|
||||||
//timeout: 3000
|
//timeout: 3000
|
||||||
};
|
};
|
||||||
@ -46,10 +46,10 @@ define(['jquery',
|
|||||||
$(el).click(function(event) {
|
$(el).click(function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
var _url = $(el).attr('link');
|
var _url = $(el).attr('link');
|
||||||
console.log("About to GET " + _url);
|
console.log("About to POST " + _url);
|
||||||
$.get(_url)
|
$.post(_url)
|
||||||
.done(self.reLoadView.bind(self))
|
.done(self.reLoadView.bind(self))
|
||||||
.fail(function() { alert("failed to GET " + _url); });
|
.fail(function() { alert("failed to POST " + _url); });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user