Skip to content

Commit

Permalink
EDGPATRON-149 Adding new endpoint to fetch patron details based on em…
Browse files Browse the repository at this point in the history
…ailId
  • Loading branch information
Vignesh-kalyanasundaram committed Oct 16, 2024
1 parent d943898 commit 3cff830
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 47 deletions.
90 changes: 45 additions & 45 deletions ramls/edge-patron.raml
Original file line number Diff line number Diff line change
Expand Up @@ -622,50 +622,50 @@ types:
body:
text/plain:
example: internal server error, contact administrator
/patron-registration-status/{emailId}:
uriParameters:
emailId:
description: The email ID of the patron.
type: string
required: true
get:
description: Get the patron details by email ID
queryParameters:
apikey:
description: "API Key"
/registration-status/{emailId}:
uriParameters:
emailId:
description: The email ID of the patron.
type: string
responses:
200:
description: patron information retrieved successfully
body:
application/json:
type: user
example: !include examples/user.json
400:
description: Validation error
body:
application/json:
type: user_error_400
example: !include examples/user_error.json
401:
description: Not authorized to perform requested action
body:
text/plain:
example: unable to get account -- unauthorized
403:
description: Access Denied
body:
text/plain:
example: Access Denied
404:
description: Validation error
body:
application/json:
type: user_error_404
example: !include examples/user_error.json
500:
description: Internal server error, e.g. due to misconfiguration
body:
text/plain:
example: internal server error, contact administrator
required: true
get:
description: Get the patron details by email ID
queryParameters:
apikey:
description: "API Key"
type: string
responses:
200:
description: patron information retrieved successfully
body:
application/json:
type: user
example: !include examples/user.json
400:
description: Validation error
body:
application/json:
type: user_error_400
example: !include examples/user_error.json
401:
description: Not authorized to perform requested action
body:
text/plain:
example: unable to get account -- unauthorized
403:
description: Access Denied
body:
text/plain:
example: Access Denied
404:
description: Validation error
body:
application/json:
type: user_error_404
example: !include examples/user_error.json
500:
description: Internal server error, e.g. due to misconfiguration
body:
text/plain:
example: internal server error, contact administrator

2 changes: 1 addition & 1 deletion src/main/java/org/folio/edge/patron/MainVerticle.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public Router defineRoutes() {
router.route(HttpMethod.POST, "/patron/account/:patronId/hold/:holdId/cancel")
.handler(patronHandler::handleCancelHold);

router.route(HttpMethod.GET, "/patron-registration-status/:emailId")
router.route(HttpMethod.GET, "/patron/registration-status/:emailId")
.handler(patronHandler::handleGetPatronRegistrationStatus);

return router;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public void getAccount(String patronId, boolean includeLoans, boolean includeCha

public void getExtPatronAccountByEmail(String email, Handler<HttpResponse<Buffer>> responseHandler,
Handler<Throwable> exceptionHandler) {
String url = String.format("%s/patron/account/by-email/%s", okapiURL, email);
String url = String.format("%s/patron/account/registration-status/%s", okapiURL, email);
get(
url,
tenant,
Expand Down

0 comments on commit 3cff830

Please sign in to comment.