Skip to content

Commit

Permalink
Fix endpoint for getting service points for item
Browse files Browse the repository at this point in the history
  • Loading branch information
vijay-eis committed Oct 15, 2024
1 parent 2cdba7b commit 75aea2f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/folio/edge/patron/PatronHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public void handleGetAllowedServicePointsForInstance(RoutingContext ctx) {
handleCommon(ctx,
new String[] { PARAM_PATRON_ID, PARAM_INSTANCE_ID },
new String[] {},
(client, params) -> ((PatronOkapiClient) client).getAllowedServicePoints(
(client, params) -> ((PatronOkapiClient) client).getAllowedServicePointsForInstance(
params.get(PARAM_PATRON_ID),
params.get(PARAM_INSTANCE_ID),
resp -> handleProxyResponse(ctx, resp),
Expand All @@ -264,7 +264,7 @@ public void handleGetAllowedServicePointsForItem(RoutingContext ctx) {
handleCommon(ctx,
new String[] { PARAM_PATRON_ID, PARAM_ITEM_ID },
new String[] {},
(client, params) -> ((PatronOkapiClient) client).getAllowedServicePoints(
(client, params) -> ((PatronOkapiClient) client).getAllowedServicePointsForItem(
params.get(PARAM_PATRON_ID),
params.get(PARAM_ITEM_ID),
resp -> handleProxyResponse(ctx, resp),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,20 @@ public void cancelHold(String patronId, String holdId, JsonObject holdCancellati
);
}

public void getAllowedServicePoints(String patronId, String instanceId,
public void getAllowedServicePointsForInstance(String patronId, String instanceId,
Handler<HttpResponse<Buffer>> responseHandler, Handler<Throwable> exceptionHandler) {

get(String.format("%s/patron/account/%s/instance/%s/allowed-service-points", okapiURL,
patronId, instanceId), tenant, null, responseHandler, exceptionHandler);
}

public void getAllowedServicePointsForItem(String patronId, String itemId,
Handler<HttpResponse<Buffer>> responseHandler, Handler<Throwable> exceptionHandler) {

get(String.format("%s/patron/account/%s/item/%s/allowed-service-points", okapiURL,
patronId, itemId), tenant, null, responseHandler, exceptionHandler);
}

public void getRequest(String holdId, Handler<HttpResponse<Buffer>> responseHandler,
Handler<Throwable> exceptionHandler) {

Expand Down

0 comments on commit 75aea2f

Please sign in to comment.