[Koha-bugs] [Bug 13895] Add API routes for checkouts retrieval and renewal

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jun 24 20:24:37 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

--- Comment #17 from Kyle M Hall <kyle at bywatersolutions.com> ---
Comment on attachment 51303
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51303
Bug 13895: Add API routes for checkouts retrieval and renewal

Review of attachment 51303:
 --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=13895&attachment=51303)
-----------------------------------------------------------------

::: Koha/REST/V1/Checkout.pm
@@ +71,5 @@
> +    my $checkout = Koha::Issues->find($checkout_id);
> +
> +    if (!$checkout) {
> +        return $c->$cb({
> +            error => "Checkout doesn't exists"

Should be "Checkout doesn't exist"

@@ +76,5 @@
> +        }, 404);
> +    }
> +
> +    $checkout = $checkout->unblessed;
> +    my ($borrowernumber, $itemnumber) = @$checkout{qw(borrowernumber itemnumber)};

This seems slower than
my $borrowernumber = $checkout->borrowernumber;
my $itemnumber = $checkout->itemnumber;

am I wrong?

::: api/v1/definitions/checkout.json
@@ +29,5 @@
> +        "lastreneweddate": {
> +            "description": "Date the item was last renewed"
> +        },
> +        "return": {
> +            "description": "?"

Looks to be unused. Maybe we should file a bug report to remove it.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list