X-Git-Url: http://git.rot13.org/?p=angular-mojolicious.git;a=blobdiff_plain;f=angular-server.pl;h=09ca4b3d089a520a8d57c127cbf9dd0a2e0cfd5e;hp=3dad3c44f6018295904cc3ab6b86b0b22d3381d9;hb=eaa220e288727cd0b7a0ee8b73603146cff9c949;hpb=d6e680885591c015d211e799b72f1f00aee61298 diff --git a/angular-server.pl b/angular-server.pl index 3dad3c4..09ca4b3 100755 --- a/angular-server.pl +++ b/angular-server.pl @@ -272,6 +272,7 @@ get '/reservations/get/(*url)' => sub { $_->{slots} = $1 if $_->{$check_slot} =~ m/$slot_regex/is; } $_->{slots} ||= $1 if $ical->{cal}->{'X-WR-CALDESC'} =~ m/$slot_regex/s; + $_->{slots} ||= 15; # XXX default number of slots $_; } @events; @@ -294,11 +295,11 @@ get '/reservations/events/:view_name' => sub { language => 'javascript', views => { submited => { - map => q| + map => q|( function(doc) { if ( doc.event && doc.event.UID ) emit(doc.event.UID, 1) } - |, + )|, reduce => q|_sum|, } }