Simplify modify_room helper

master
Daniel Berteaud 10 years ago
parent 91465f1c1b
commit dcc651763b
  1. 6
      vroom.pl

@ -265,7 +265,7 @@ helper modify_room => sub {
WHERE `id`=?'); WHERE `id`=?');
}; };
if ($@){ if ($@){
return {msg => $@}; return 0;
} }
$sth->execute( $sth->execute(
$room->{owner}, $room->{owner},
@ -277,10 +277,10 @@ helper modify_room => sub {
$room->{id} $room->{id}
); );
if ($sth->err){ if ($sth->err){
return {msg => "DB Error: " . $sth->errstr . " (code " . $sth->err . ")"}; return 0;
} }
$self->app->log->info("Room " . $room->{name} ." modified by " . $self->session('name')); $self->app->log->info("Room " . $room->{name} ." modified by " . $self->session('name'));
return {ok => 1}; return 1;
}; };
# Add a participant in the database. Used by the signaling server to check # Add a participant in the database. Used by the signaling server to check

Loading…
Cancel
Save