-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MODPATRON-165]-Added POST api for external patron. #140
Conversation
private Set<String> departments; | ||
|
||
@Valid | ||
private List<String> proxyFor; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove unused fields in this class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
} | ||
|
||
private CompletableFuture<String> getRemotePatronGroupId(UserRepository userRepository, Map<String, String> okapiHeaders) { | ||
return userRepository.getGroupByGroupName("staff", okapiHeaders) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use string constant for staff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
JsonObject addressTypes = new JsonObject(); | ||
responseJson.getJsonArray("addressTypes").forEach(item -> { | ||
JsonObject addressType = (JsonObject) item; | ||
if ("Home".equalsIgnoreCase(addressType.getString("addressType"))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use string constants for home and work keywords
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
return CompletableFuture.completedFuture( | ||
PostPatronAccountResponse.respond403WithTextPlain("User does not belong to the required patron group") | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls check the error response code and error message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Adesh
|
https://folio-org.atlassian.net/browse/MODPATRON-166.
Approach:- In scope of this PR we are creating user based on LOC application requirement .