Commit | Line | Data |
d2739840 |
1 | package RestTest::Controller::API::REST::Artist; |
2 | use Moose; |
3 | BEGIN { extends 'Catalyst::Controller::DBIC::API::REST' } |
4 | use namespace::autoclean; |
5 | |
6 | __PACKAGE__->config |
7 | ( action => { setup => { PathPart => 'artist', Chained => '/api/rest/rest_base' } }, |
8 | class => 'RestTestDB::Artist', |
9 | create_requires => ['name'], |
10 | create_allows => ['name'], |
11 | update_allows => ['name'], |
12 | prefetch_allows => [[qw/ cds /],{ 'cds' => 'tracks'}], |
13 | ); |
14 | |
68e02291 |
15 | sub action_with_error : Chained('objects_no_id') PathPart('action_with_error') Args(0) { |
16 | my ( $self, $c ) = @_; |
17 | |
18 | $c->res->status(404); |
19 | } |
20 | |
d2739840 |
21 | 1; |