From 71be69ae50c5d913c069ba3c17966c211c481d5b Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 17 Apr 2019 15:06:44 -0300 Subject: [PATCH] Bug 22729: Adapt /patrons controller code to the change Content-Type: text/plain; charset=utf-8 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 --- Koha/REST/V1/Patrons.pm | 2 -- api/v1/swagger/definitions/patron.json | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Koha/REST/V1/Patrons.pm b/Koha/REST/V1/Patrons.pm index e4f7ba1125..5e8e398eac 100644 --- a/Koha/REST/V1/Patrons.pm +++ b/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', diff --git a/api/v1/swagger/definitions/patron.json b/api/v1/swagger/definitions/patron.json index 1e87ffce91..7fca15bf35 100644 --- a/api/v1/swagger/definitions/patron.json +++ b/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, -- 2.11.0