Exclude hidden links from get all links#73
Open
ivshapovalov wants to merge 14 commits intoJujaLabs:developfrom
Open
Exclude hidden links from get all links#73ivshapovalov wants to merge 14 commits intoJujaLabs:developfrom
ivshapovalov wants to merge 14 commits intoJujaLabs:developfrom
Conversation
Benkoff
requested changes
Jan 17, 2018
| query.addCriteria(Criteria.where("hidden").is(false)); | ||
| List<Link> result = mongoTemplate.find(query, Link.class, mongoCollectionName); | ||
| log.info("Found {} active links in database", result); | ||
| return result; |
There was a problem hiding this comment.
i doubt that this is a good idea to apply filters to getAllLinks() method at repository level.
what about a new one like getAllNotHiddenLinks or anything similar?
Contributor
Author
There was a problem hiding this comment.
Exactly. Thanks
| @ApiModelProperty(value = "URL of saved link", required = true) | ||
| private String url; | ||
|
|
||
| @ApiModelProperty(value = "Flag that means link is hidden or active") |
There was a problem hiding this comment.
i'd remove final part "or active". if you want to use it as a substitute for "not hidden", there are a lot of more evident words like open, public, visible, apparent so on. but as for me its better to use a simple negation: "Flag that means the link is hidden or not".
Benkoff
previously approved these changes
Jan 17, 2018
…n-links-from-get-all-links # Conflicts: # links/src/main/java/juja/microservices/links/config/CorsConfig.java # links/src/main/java/juja/microservices/links/controller/LinksController.java # links/src/main/java/juja/microservices/links/model/Link.java # links/src/main/java/juja/microservices/links/model/SaveLinkRequest.java # links/src/main/java/juja/microservices/links/repository/impl/LinksRepositoryImpl.java # links/src/test/java/juja/microservices/links/controller/LinksControllerTest.java # links/src/test/java/juja/microservices/links/service/LinksServiceTest.java
"hidden".ne(true) obtain links without "hidden" fields
we suppose that links without "hidden" field are equals
links with hidden default value 'false'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
close #62 or issue #49