Added error flag to validation errors and added age_range api endpoint
This commit is contained in:
parent
6fac2058bc
commit
b03b7ccc5f
3 changed files with 25 additions and 0 deletions
12
lib/Pear/LocalLoop/Controller/Api/Info.pm
Normal file
12
lib/Pear/LocalLoop/Controller/Api/Info.pm
Normal file
|
@ -0,0 +1,12 @@
|
|||
package Pear::LocalLoop::Controller::Api::Info;
|
||||
use Mojo::Base 'Mojolicious::Controller';
|
||||
|
||||
sub get_ages {
|
||||
my $c = shift;
|
||||
|
||||
my $ages = $c->schema->resultset('AgeRange');
|
||||
|
||||
$c->render( json => { ages => [ $ages->all ] } );
|
||||
}
|
||||
|
||||
1;
|
Reference in a new issue