mirror of
https://github.com/dani/vroom.git
synced 2024-06-17 19:59:13 +02:00
Cleanups in delete_room
This commit is contained in:
parent
49aab66082
commit
4053d8dc95
8
vroom.pl
8
vroom.pl
|
@ -479,7 +479,7 @@ helper delete_room => sub {
|
|||
my $data = $self->get_room_by_name($room);
|
||||
if (!$data){
|
||||
$self->app->log->debug("Error: room $room doesn't exist");
|
||||
return undef;
|
||||
return 0;
|
||||
}
|
||||
if ($ec && $data->{etherpad_group}){
|
||||
$ec->delete_pad($data->{etherpad_group} . '$' . $room);
|
||||
|
@ -487,9 +487,9 @@ helper delete_room => sub {
|
|||
}
|
||||
my $sth = eval {
|
||||
$self->db->prepare('DELETE FROM `rooms`
|
||||
WHERE `id`=?');
|
||||
} || return undef;
|
||||
$sth->execute($data->{id}) || return undef;
|
||||
WHERE `name`=?');
|
||||
};
|
||||
$sth->execute($room);
|
||||
return 1;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user