Return an error if trying to create an already existing room

This commit is contained in:
Daniel Berteaud 2015-06-26 13:30:46 +02:00
parent 57c5252f7e
commit a7efdd54a7
1 changed files with 1 additions and 0 deletions

View File

@ -207,6 +207,7 @@ helper create_room => sub {
return 0;
}
if ($self->get_room_by_name($name)){
return 0;
}
my $sth = eval {
$self->db->prepare('INSERT INTO `rooms`