]> git.koha-community.org Git - koha.git/commit
Bug 28424: Fix patron credits route (POST)
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 21 May 2021 21:25:12 +0000 (18:25 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 25 May 2021 07:28:17 +0000 (09:28 +0200)
commitcfcc34fde792d0ee536abc63b2d708ca773939d8
tree8eafb59dbefc7410edc532638cdab08598ef7729
parentd86fbe95d38280c766ea0fc5c9d9ce6f49660046
Bug 28424: Fix patron credits route (POST)

This patch makes the route follow the coding guidelines and thus:
- Return the generated object
- Use the status code 201 for the response

To test:
1. Apply the tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/patrons_accounts.t
=> FAIL: Tests fail. The reponse body and status is incorrect
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/REST/V1/Patrons/Account.pm
api/v1/swagger/paths/patrons_account.json