HTTP codes fr set_join_pass and set_owner_pass API calls

master
Daniel Berteaud 10 years ago
parent fd9dcd006b
commit ebae2f0117
  1. 16
      vroom.pl

@ -1389,7 +1389,7 @@ any '/api' => sub {
return $self->render( return $self->render(
json => { json => {
msg => $self->l('ERROR_OCCURRED'), msg => $self->l('ERROR_OCCURRED'),
err => 'ERROR_OCCURRED' err => 'ERROR_OCCURRED',
status => 'error' status => 'error'
}, },
status => 503 status => 503
@ -1476,8 +1476,10 @@ any '/api' => sub {
return $self->render( return $self->render(
json => { json => {
msg => $self->('ERROR_OCCURRED'), msg => $self->('ERROR_OCCURRED'),
err => 'ERROR_OCCURRED',
status => 'error' status => 'error'
} },
status => 503
); );
} }
elsif ($req->{action} eq 'set_owner_password'){ elsif ($req->{action} eq 'set_owner_password'){
@ -1485,8 +1487,10 @@ any '/api' => sub {
return $self->render( return $self->render(
json => { json => {
status => 'error', status => 'error',
msg => $self->l('ERROR_COMMON_ROOM_NAME') msg => $self->l('ERROR_COMMON_ROOM_NAME'),
} err => 'ERROR_COMMON_ROOM_NAME'
},
status => 406
); );
} }
$room->{owner_password} = ($req->{param}->{password} && $req->{param}->{password} ne '') ? $room->{owner_password} = ($req->{param}->{password} && $req->{param}->{password} ne '') ?
@ -1502,8 +1506,10 @@ any '/api' => sub {
return $self->render( return $self->render(
json => { json => {
msg => $self->('ERROR_OCCURRED'), msg => $self->('ERROR_OCCURRED'),
err => 'ERROR_OCCURRED',
status => 'error' status => 'error'
} },
status => 503
); );
} }
elsif ($req->{action} eq 'set_persistent'){ elsif ($req->{action} eq 'set_persistent'){

Loading…
Cancel
Save