Make endpoints under /api apart form in testing
This commit is contained in:
parent
affa51d1e6
commit
85444b1c70
1 changed files with 2 additions and 0 deletions
|
@ -24,6 +24,7 @@ $self->plugin( 'Config', {
|
|||
});
|
||||
my $config = $self->config;
|
||||
|
||||
|
||||
my $schema = Pear::LocalLoop::Schema->connect($config->{dsn},$config->{user},$config->{pass}) or die "Could not connect";
|
||||
my $dbh = $schema->storage->dbh;
|
||||
$dbh->do("PRAGMA foreign_keys = ON");
|
||||
|
@ -38,6 +39,7 @@ $self->helper( db => sub { $dbh });
|
|||
$self->helper( schema => sub { $schema });
|
||||
|
||||
my $r = $self->routes;
|
||||
$r = $r->any('/api') if $self->app->mode ne 'testing';
|
||||
|
||||
$r->post("/register")->to('register#post_register');
|
||||
|
||||
|
|
Reference in a new issue