fix slash between database and entity
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 30 Oct 2010 23:00:17 +0000 (01:00 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 30 Oct 2010 23:00:17 +0000 (01:00 +0200)
angular-server.pl

index e21ec59..6df0cbe 100755 (executable)
@@ -26,7 +26,7 @@ get '/_replicate' => sub {
                if ( $database && $entities ) {
                        foreach my $entity ( keys %$entities ) {
                                my $url = $from;
-                               $url =~ s{/+$}{/};
+                               $url =~ s{/?$}{/}; # add slash at end
                                $url .= $entity;
                                my $e = $self->client->get( $url )->res->json;
                                warn "# replicated $url ", dump($e);