From d029bba1a917b74519eed892c826cb5e5a85abd4 Mon Sep 17 00:00:00 2001 From: Finn Date: Mon, 5 Mar 2018 15:37:01 +0000 Subject: [PATCH] Added initial for upload to accept recurring type --- lib/Pear/LocalLoop/Controller/Api/Upload.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Pear/LocalLoop/Controller/Api/Upload.pm b/lib/Pear/LocalLoop/Controller/Api/Upload.pm index d1a0bd2..56a149f 100644 --- a/lib/Pear/LocalLoop/Controller/Api/Upload.pm +++ b/lib/Pear/LocalLoop/Controller/Api/Upload.pm @@ -109,6 +109,7 @@ sub post_upload { $validation->optional('purchase_time')->is_full_iso_datetime; $validation->optional('category')->in_resultset( 'id', $c->schema->resultset('Category')); $validation->optional('essential'); + $validation->optional('recurring'); # First pass of required items return $c->api_validation_error if $validation->has_error; @@ -186,6 +187,7 @@ sub post_upload { my $file = defined $upload ? $c->store_file_from_upload( $upload ) : undef; my $category = $validation->param('category'); my $essential = $validation->param('essential'); + my $recurring_type = $validation->('recurring'); my $distance = $c->get_distance_from_coords( $user->entity->type_object, $organisation ); my $new_transaction = $organisation->entity->create_related(