HTTP codes in update_room_conf API call

master
Daniel Berteaud 10 years ago
parent d197d3c96d
commit fd9dcd006b
  1. 14
      public/js/vroom.js
  2. 6
      vroom.pl

@ -307,22 +307,22 @@ $('#configureRoomForm').submit(function(e){
}
})
},
error: function() {
error: function(data) {
data = data.responseJSON;
if (data.msg){
$.notify(data.msg, 'error');
}
else{
$.notify(locale.ERROR_OCCURRED, 'error');
}
},
success: function(data) {
$('#ownerPass,#ownerPassConfirm,#joinPass,#joinPassConfirm').val('');
if (data.status == 'success'){
$('#configureModal').modal('hide');
// Hide passwords inputs too
$('#joinPassFields,#ownerPassFields').hide();
$.notify(data.msg, 'info');
$('#configureRoomForm').trigger('room_conf_updated');
}
else{
$.notify(data.msg, 'error');
}
}
});
});

@ -1455,8 +1455,10 @@ any '/api' => sub {
return $self->render(
json => {
status => 'error',
msg => $self->l('ERROR_OCCURRED')
}
msg => $self->l('ERROR_OCCURRED'),
err => 'ERROR_OCCURRED'
},
staus => 503
);
}
# Handle password (join and owner)

Loading…
Cancel
Save