Skip to content

Commit

Permalink
[#2] Type error in validate_params call
Browse files Browse the repository at this point in the history
Signed-off-by: Tomas Cohen Arazi <[email protected]>
  • Loading branch information
tomascohen committed Feb 20, 2025
1 parent e184b3f commit 9d82dc1
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions Koha/Plugin/Com/ByWaterSolutions/RapidoILL/lib/RapidoILL/Client.pm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package RapidoILL::Client;
use Modern::Perl;

use Encode;
use JSON qw( decode_json );
use JSON qw( decode_json );
use Try::Tiny qw(catch try);

use RapidoILL::Exceptions;
Expand Down Expand Up @@ -111,7 +111,7 @@ sub locals {
sub lender_cancel {
my ( $self, $params, $options ) = @_;

$self->validate_params( { params => $params, required => qw(circId localBibId patronName), } );
$self->validate_params( { params => $params, required => [qw(circId localBibId patronName)], } );

my $response;

Expand Down Expand Up @@ -153,14 +153,16 @@ sub lender_visiting_patron_checkout {
$self->validate_params(
{
params => $params,
required => qw(
patronId
patronAgencyCode
centralPatronType
uuid
patronName
items
),
required => [
qw(
patronId
patronAgencyCode
centralPatronType
uuid
patronName
items
)
],
}
);

Expand Down Expand Up @@ -202,7 +204,7 @@ sub lender_visiting_patron_checkout {
sub lender_checkin {
my ( $self, $params, $options ) = @_;

$self->validate_params( { params => $params, required => qw(circId), } );
$self->validate_params( { params => $params, required => [qw(circId)], } );

my $response;

Expand Down Expand Up @@ -236,7 +238,7 @@ sub lender_checkin {
sub lender_shipped {
my ( $self, $params, $options ) = @_;

$self->validate_params( { params => $params, required => qw(callNumber circId itemBarcode), } );
$self->validate_params( { params => $params, required => [qw(callNumber circId itemBarcode)], } );

my $response;

Expand Down Expand Up @@ -274,7 +276,7 @@ sub lender_shipped {
sub borrower_item_received {
my ( $self, $params, $options ) = @_;

$self->validate_params( { params => $params, required => qw(circId), } );
$self->validate_params( { params => $params, required => [qw(circId)], } );

my $response;

Expand Down Expand Up @@ -306,7 +308,7 @@ sub borrower_item_received {
sub borrower_item_returned {
my ( $self, $params, $options ) = @_;

$self->validate_params( { params => $params, required => qw(circId), } );
$self->validate_params( { params => $params, required => [qw(circId)], } );

my $response;

Expand Down Expand Up @@ -342,9 +344,9 @@ All filtering options are not mandatory.
=cut

sub circulation_requests {
my ( $self, $params ) = @_;
my ( $self, $params, $options ) = @_;

$self->validate_params( { params => $params, required => qw(startTime endTime), } );
$self->validate_params( { params => $params, required => [qw(startTime endTime)], } );

my $response;

Expand Down

0 comments on commit 9d82dc1

Please sign in to comment.