package Catalyst::Controller::DBIC::API::RPC;
+
#ABSTRACT: Provides an RPC interface to DBIx::Class
use Moose;
=cut
-=method_protected index
-
-Chained: L</setup>
-PathPart: ''
-Args: 0
-
-Returns http status code 404 by default.
-
-=cut
-
-sub index : Chained('setup') PathPart('') Args(0) {
- my ( $self, $c ) = @_;
-
- $self->push_error($c, { message => 'Not implemented' });
- $c->res->status( '404' );
-}
-
=method_protected create
Chained: L</objects_no_id>
=cut
-sub create :Chained('objects_no_id') :PathPart('create') :Args(0)
-{
- my ($self, $c) = @_;
+sub create : Chained('objects_no_id') : PathPart('create') : Args(0) {
+ my ( $self, $c ) = @_;
$self->update_or_create($c);
}
=cut
-sub list :Chained('deserialize') :PathPart('list') :Args(0)
-{
- my ($self, $c) = @_;
+sub list : Chained('deserialize') : PathPart('list') : Args(0) {
+ my ( $self, $c ) = @_;
$self->next::method($c);
}
=cut
-sub item :Chained('object_with_id') :PathPart('') :Args(0)
-{
- my ($self, $c) = @_;
+sub item : Chained('object_with_id') : PathPart('') : Args(0) {
+ my ( $self, $c ) = @_;
$self->next::method($c);
}
=cut
-sub update :Chained('object_with_id') :PathPart('update') :Args(0)
-{
- my ($self, $c) = @_;
+sub update : Chained('object_with_id') : PathPart('update') : Args(0) {
+ my ( $self, $c ) = @_;
$self->update_or_create($c);
}
=cut
-sub delete :Chained('object_with_id') :PathPart('delete') :Args(0)
-{
- my ($self, $c) = @_;
+sub delete : Chained('object_with_id') : PathPart('delete') : Args(0) {
+ my ( $self, $c ) = @_;
$self->next::method($c);
}
=cut
-sub update_bulk :Chained('objects_no_id') :PathPart('update') :Args(0)
-{
- my ($self, $c) = @_;
+sub update_bulk : Chained('objects_no_id') : PathPart('update') : Args(0) {
+ my ( $self, $c ) = @_;
$self->update_or_create($c);
}
=cut
-sub delete_bulk :Chained('objects_no_id') :PathPart('delete') :Args(0)
-{
- my ($self, $c) = @_;
- $self->next::method($c);
+sub delete_bulk : Chained('objects_no_id') : PathPart('delete') : Args(0) {
+ my ( $self, $c ) = @_;
+ $self->delete($c);
}
1;