1
0
mirror of https://github.com/dani/vroom.git synced 2024-06-02 05:21:39 +02:00

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

View File

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