HTTP codes in delete_room API call

master
Daniel Berteaud 10 years ago
parent 1a6722f7b8
commit ff1cda4d4b
  1. 18
      public/js/vroom.js
  2. 4
      vroom.pl

@ -557,7 +557,13 @@ function initAdmin(){
})
},
error: function(data){
$.notify(locale.ERROR_OCCURRED, 'error');
data = data.responseJSON;
if (data.msg){
$.notify(data.msg, 'error');
}
else{
$.notify(locale.ERROR_OCCURRED, 'error');
}
},
success: function(data){
$.notify(data.msg, 'success');
@ -2035,10 +2041,16 @@ function initVroom(room) {
},
async: false,
error: function(data) {
$.notify(locale.ERROR_OCCURRED, 'error');
data = data.responseJSON;
if (data.msg){
$.notify(data.msg, 'error');
}
else{
$.notify(locale.ERROR_OCCURRED, 'error');
}
},
success: function(data) {
if (data.status == 'success' && data.msg && data.msg != ''){
if (data.msg && data.msg != ''){
$.notify(data.msg, 'info');
}
}

@ -1822,8 +1822,10 @@ any '/api' => sub {
return $self->render(
json => {
msg => $self->l('ERROR_OCCURRED'),
err => 'ERROR_OCCURRED',
status => 'error'
}
},
status => 503
);
}
};

Loading…
Cancel
Save