From 93d40e575c0e65ba4bec7694c0f9a7564f485e65 Mon Sep 17 00:00:00 2001 From: Janis Saldabols Date: Wed, 9 Oct 2024 09:47:08 +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 5714098..fb247c2 100644 --- a/src/main/java/org/folio/ncip/FolioRemoteServiceManager.java +++ b/src/main/java/org/folio/ncip/FolioRemoteServiceManager.java @@ -1061,6 +1061,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 472c23a..e2e9659 100644 --- a/src/main/java/org/folio/ncip/services/FolioLookupUserService.java +++ b/src/main/java/org/folio/ncip/services/FolioLookupUserService.java @@ -133,7 +133,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)); }