package Catalyst::Controller::DBIC::API::RPC;
+
#ABSTRACT: Provides an RPC interface to DBIx::Class
use Moose;
=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) = @_;
+sub delete_bulk : Chained('objects_no_id') : PathPart('delete') : Args(0) {
+ my ( $self, $c ) = @_;
$self->delete($c);
}