X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Controller-DBIC-API.git;a=blobdiff_plain;f=lib%2FCatalyst%2FController%2FDBIC%2FAPI%2FREST.pm;h=a66cb8d7bea2b861042aec88fd62bc7495dce5a8;hp=23655e25a12dcb72ae9ba32b154293f186a0111b;hb=3d85db11441182964cf35818ed25265eec1b74e2;hpb=9a29ee35ad6dba84d7741dc1e115fe90583a5d88 diff --git a/lib/Catalyst/Controller/DBIC/API/REST.pm b/lib/Catalyst/Controller/DBIC/API/REST.pm index 23655e2..a66cb8d 100644 --- a/lib/Catalyst/Controller/DBIC/API/REST.pm +++ b/lib/Catalyst/Controller/DBIC/API/REST.pm @@ -42,7 +42,7 @@ Chained: L PathPart: none CaptureArgs: 0 -Forwards to list level methods described in L as follows: +Calls list level methods described in L as follows: DELETE: L POST/PUT: L @@ -50,30 +50,30 @@ GET: forwards to L =cut -sub no_id : Chained('objects_no_id') PathPart('') ActionClass('REST') {} +sub no_id : Chained('objects_no_id') PathPart('') ActionClass('REST') :Args(0) {} sub no_id_PUT { my ( $self, $c ) = @_; - $c->forward('update_or_create'); + $self->update_or_create($c); } sub no_id_POST { my ( $self, $c ) = @_; - $c->forward('update_or_create'); + $self->update_or_create($c); } sub no_id_DELETE { my ( $self, $c ) = @_; - $c->forward('delete'); + $self->delete($c); } sub no_id_GET { my ( $self, $c ) = @_; - $c->forward('list'); + $self->list($c); } =method_protected with_id @@ -90,30 +90,30 @@ GET: forwards to L =cut -sub with_id :Chained('object_with_id') :PathPart('') :ActionClass('REST') {} +sub with_id :Chained('object_with_id') :PathPart('') :ActionClass('REST') :Args(0) {} sub with_id_PUT { my ( $self, $c ) = @_; - $c->forward('update_or_create'); + $self->update_or_create($c); } sub with_id_POST { my ( $self, $c ) = @_; - $c->forward('update_or_create'); + $self->update_or_create($c); } sub with_id_DELETE { my ( $self, $c ) = @_; - $c->forward('delete'); + $self->delete($c); } sub with_id_GET { my ( $self, $c ) = @_; - $c->forward('item'); + $self->item($c); } 1;