This commit is contained in:
Julian Lam
2014-09-29 12:47:41 -04:00
parent d303dea6c7
commit dedf7a6715
2 changed files with 9 additions and 2 deletions

View File

@@ -32,10 +32,11 @@ $(document).ready(function() {
if (data) {
if (data.status === 404) {
return ajaxify.go('404');
} else if (data.status === 403) {
} else if (data.status === 401) {
app.alertError('[[global:please_log_in]]');
app.previousUrl = url;
return ajaxify.go('login');
} else if (data.statuc === 403) {
app.alertError('[[error:no-privileges]]');
} else if (data.status === 302) {
return ajaxify.go(data.responseJSON.slice(1), callback, quiet);
}