-
Notifications
You must be signed in to change notification settings - Fork 4
BUG/CITE-212: Adding search endpoint with collections #259
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
base: develop
Are you sure you want to change the base?
Conversation
Can one of the admins verify this patch? |
|
||
if (group == null) { | ||
logger.error("User " + user.getUsername() + " does not have access to group " + zoteroGroupId); | ||
return "error/404"; |
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.
if the user doesn't have access they should get a 403.
breadCrumbs.add(new BreadCrumb(group.getName(), BreadCrumbType.GROUP, group.getGroupId() + "", group)); | ||
Collections.reverse(breadCrumbs); | ||
model.addAttribute("breadCrumbs", breadCrumbs); | ||
return "auth/group/items"; |
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.
that looks like a lot of duplicate code; should be more DRY.
…e SearchItemsDataDto class
…ew name to returning JSON data
foundCitations.add(mapReference(r)); | ||
}); | ||
return new ResultPage(foundCitations, results.getTotalElements(), results.getTotalPages()); | ||
} |
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.
isn't this pretty much the same code as in the search method above? DRY
|
||
Gson gson = new Gson(); | ||
return gson.toJson(searchItemsData, SearchItemsDataDto.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.
same here, looks like pretty much the same as the above method. I actually doubt you'll need two separate methods.
Guidelines for Pull Requests
If you haven't yet read our code review guidelines, please do so, You can find them here.
Please confirm the following by adding an x for each item (turn
[ ]
into[x]
).Please provide a brief description of your ticket
https://diging.atlassian.net/browse/CITE-212
... Put ticket description here and add link to ticket ...
Are there any other pull requests that this one depends on?
Anything else the reviewer needs to know?
... describe here ...