Browse Source

Bug 22729: Adapt /patrons controller code to the change

This patch makes the controller code aware of the flgAnonymized =>
anonymized change.

To test:
- Run
  $ kshell
 k$ prove t/db_dependent/api/v1/patrons.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
19.05.x
Tomás Cohen Arazi 4 years ago
committed by Nick Clemens
parent
commit
7021af6879
  1. 2
      Koha/REST/V1/Patrons.pm
  2. 6
      api/v1/swagger/definitions/patron.json

2
Koha/REST/V1/Patrons.pm

@ -400,7 +400,6 @@ our $to_api_mapping = {
debarredcomment => undef, # calculated, API consumers will use /restrictions instead
emailpro => 'secondary_email',
flags => undef, # permissions manipulation handled in /permissions
flgAnonymized => 'anonymized',
gonenoaddress => 'incorrect_address',
guarantorid => 'guarantor_id',
lastseen => 'last_seen',
@ -444,7 +443,6 @@ our $to_api_mapping = {
our $to_model_mapping = {
altaddress_notes => 'contactnote',
anonymized => 'flgAnonymized',
category_id => 'categorycode',
check_previous_checkout => 'checkprevcheckout',
date_enrolled => 'dateenrolled',

6
api/v1/swagger/definitions/patron.json

@ -274,9 +274,9 @@
"description": "persist OverDrive auth token"
},
"anonymized": {
"type": "boolean",
"readOnly": true,
"description": "If the patron has been anonymized"
"type": "boolean",
"readOnly": true,
"description": "If the patron has been anonymized"
}
},
"additionalProperties": false,

Loading…
Cancel
Save