fixed #900 - api calls hopefully no longer cached

v1.18.x
Julian Lam 11 years ago
parent fb2b54b314
commit de751ed623

@ -186,8 +186,10 @@
parse_template(); parse_template();
} }
apiXHR = jQuery.get(RELATIVE_PATH + '/api/' + api_url, function (data) { apiXHR = $.ajax({
url: RELATIVE_PATH + '/api/' + api_url,
cache: false,
success: function (data) {
if (!data) { if (!data) {
ajaxify.go('404'); ajaxify.go('404');
return; return;
@ -195,8 +197,9 @@
template_data = data; template_data = data;
parse_template(); parse_template();
}).fail(function (data, textStatus) { },
jQuery('#content, #footer').stop(true, true).removeClass('ajaxifying'); error: function (data, textStatus) {
$('#content, #footer').stop(true, true).removeClass('ajaxifying');
if (data && data.status == 404) { if (data && data.status == 404) {
return ajaxify.go('404'); return ajaxify.go('404');
} else if (data && data.status === 403) { } else if (data && data.status === 403) {
@ -204,6 +207,7 @@
} else if (textStatus !== "abort") { } else if (textStatus !== "abort") {
app.alertError(data.responseJSON.error); app.alertError(data.responseJSON.error);
} }
}
}); });
function parse_template() { function parse_template() {

Loading…
Cancel
Save