HTTP codes in get_pad_session API call

master
Daniel Berteaud 10 years ago
parent 3fb6de8afa
commit 1a6722f7b8
  1. 19
      public/js/vroom.js
  2. 4
      vroom.pl

@ -1487,18 +1487,19 @@ function initVroom(room) {
}) })
}, },
error: function(data) { 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) { success: function(data) {
if (data.status == 'success'){ if (data.msg){
if (data.msg){ $.notify(data.msg, 'success');
$.notify(data.msg, 'success');
}
loadEtherpadIframe();
}
else if (data.msg){
$.notify(data.msg, 'error');
} }
loadEtherpadIframe();
} }
}); });
} }

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

Loading…
Cancel
Save