Bugzilla – Attachment 59242 Details for
Bug 15165
REST API routes to list, edit and pay borrower's accountlines
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15165: followup - fix definitions, and passing amount parameter in pay method
Bug-15165-followup---fix-definitions-and-passing-a.patch (text/plain), 1.98 KB, created by
Josef Moravec
on 2017-01-19 13:15:07 UTC
(
hide
)
Description:
Bug 15165: followup - fix definitions, and passing amount parameter in pay method
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2017-01-19 13:15:07 UTC
Size:
1.98 KB
patch
obsolete
>From d3260b93ede722861fe2af0be98d5ab447a15cb2 Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Wed, 30 Nov 2016 17:21:59 +0000 >Subject: [PATCH] Bug 15165: followup - fix definitions, and passing amount > parameter in pay method > >--- > Koha/REST/V1/Accountline.pm | 2 +- > api/v1/swagger/paths/accountlines.json | 5 +++++ > t/db_dependent/api/v1/accountlines.t | 1 - > 3 files changed, 6 insertions(+), 2 deletions(-) > >diff --git a/Koha/REST/V1/Accountline.pm b/Koha/REST/V1/Accountline.pm >index 9ee8aa8..57f83dd 100644 >--- a/Koha/REST/V1/Accountline.pm >+++ b/Koha/REST/V1/Accountline.pm >@@ -61,7 +61,7 @@ sub pay { > } > > my $body = $c->req->json; >- my $amount = defined $body->{amount}; >+ my $amount = $body->{amount}; > my $note = $body->{note} || ''; > > if ($amount && !looks_like_number($amount)) { >diff --git a/api/v1/swagger/paths/accountlines.json b/api/v1/swagger/paths/accountlines.json >index 89ebb23..726ffb7 100644 >--- a/api/v1/swagger/paths/accountlines.json >+++ b/api/v1/swagger/paths/accountlines.json >@@ -3,6 +3,11 @@ > "get": { > "operationId": "listAccountlines", > "tags": ["accountlines"], >+ "parameters": [ >+ { >+ "$ref": "../parameters.json#/borrowernumberQueryParam" >+ } >+ ], > "produces": [ > "application/json" > ], >diff --git a/t/db_dependent/api/v1/accountlines.t b/t/db_dependent/api/v1/accountlines.t >index 4d918dd..a91b160 100644 >--- a/t/db_dependent/api/v1/accountlines.t >+++ b/t/db_dependent/api/v1/accountlines.t >@@ -192,7 +192,6 @@ $t->request_ok($tx) > ->status_is(404); > > my $accountline_to_partiallypay = Koha::Account::Lines->search({'borrowernumber' => $borrowernumber, 'amount' => 80})->unblessed()->[0]; >- > $tx = $t->ua->build_tx(POST => "/api/v1/accountlines/$accountline_to_partiallypay->{accountlines_id}/payment" => json => {amount => 'foo'}); > $tx->req->cookies({name => 'CGISESSID', value => $session->id}); > $tx->req->env({REMOTE_ADDR => '127.0.0.1'}); >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15165
:
44804
|
44805
|
44806
|
45259
|
50189
|
50190
|
50191
|
50790
|
52681
|
52682
|
52683
|
55033
|
55034
|
55035
|
56694
|
56695
|
56696
|
57843
|
57844
|
57845
|
57846
|
59239
|
59240
|
59241
|
59242
|
59932
|
59933
|
59934
|
60180
|
62769
|
62770
|
62771
|
62772
|
62773
|
62774
|
62775