HTTP codes in get_pad_session API call

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

@ -1487,19 +1487,20 @@ function initVroom(room) {
}) })
}, },
error: function(data) { error: function(data) {
data = data.responseJSON;
if (data.msg){
$.notify(data.msg, 'error');
}
else{
$.notify(locale.ERROR_OCCURRED, 'error'); $.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(); loadEtherpadIframe();
} }
else if (data.msg){
$.notify(data.msg, 'error');
}
}
}); });
} }
var who = (peers[data.id].hasName) ? peers[data.id].displayName : locale.A_ROOM_ADMIN; var who = (peers[data.id].hasName) ? peers[data.id].displayName : locale.A_ROOM_ADMIN;

@ -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