From ff7f26704fc5f397290f673ee126f0bdd67cd2a2 Mon Sep 17 00:00:00 2001 From: Janis Saldabols Date: Wed, 9 Oct 2024 09:52:55 +0300 Subject: [PATCH] Fix user UUID mismatch --- src/main/java/org/folio/ncip/FolioRemoteServiceManager.java | 1 + .../java/org/folio/ncip/services/FolioLookupUserService.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/folio/ncip/FolioRemoteServiceManager.java b/src/main/java/org/folio/ncip/FolioRemoteServiceManager.java index 733c3b0..097a50e 100644 --- a/src/main/java/org/folio/ncip/FolioRemoteServiceManager.java +++ b/src/main/java/org/folio/ncip/FolioRemoteServiceManager.java @@ -1054,6 +1054,7 @@ public JsonObject lookupUser(UserId userid) throws Exception { return user; String id = user.getString(Constants.ID); user = gatherPatronData(user, id); + user.put("userUuid", id); return user; } diff --git a/src/main/java/org/folio/ncip/services/FolioLookupUserService.java b/src/main/java/org/folio/ncip/services/FolioLookupUserService.java index ce33064..688b126 100644 --- a/src/main/java/org/folio/ncip/services/FolioLookupUserService.java +++ b/src/main/java/org/folio/ncip/services/FolioLookupUserService.java @@ -132,7 +132,7 @@ private LookupUserResponseData constructResponse(LookupUserInitiationData initDa responseData.setUserId(this.retrieveBarcode(userDetails, requesterAgencyId)); UserId userUuid = new UserId(); userUuid.setUserIdentifierType(new UserIdentifierType("uuid")); - userUuid.setUserIdentifierValue(userDetails.getString("id")); + userUuid.setUserIdentifierValue(userDetails.getString("userUuid")); responseData.getUserOptionalFields().setUserIds(List.of(userUuid)); }