Version 2.008001
[catagits/Catalyst-Controller-DBIC-API.git] / t / lib / RestTest / Controller / API / REST / BoundArtist.pm
1 package RestTest::Controller::API::REST::BoundArtist;
2 use Moose;
3 BEGIN { extends 'RestTest::Controller::API::REST::Artist'; }
4
5 use namespace::autoclean;
6
7 __PACKAGE__->config
8     ( action => { setup => { PathPart => 'bound_artist', Chained => '/api/rest/rest_base' } },
9       class => 'RestTestDB::Artist',
10       create_requires => ['name'],
11       create_allows => ['name'],
12       update_allows => ['name']
13       );
14
15 # Arbitrary limit
16 override list_munge_parameters => sub
17 {
18     my ( $self, $c) = @_;
19     # Return the first one, regardless of arguments
20     $c->req->search_parameters->[0]->{'me.artistid'} = 1;
21 };
22
23 1;