-
Notifications
You must be signed in to change notification settings - Fork 1
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
Moved follow repositories & methods to AccountService, created AccountService object in InboxController #122
Conversation
shirlsli
commented
Aug 30, 2023
- Moved followerHandle, userFollow, and paginateFollowers from InboxController to AccountService
- Created AccountService object in InboxController for usersFollowers and usersFollowing to access methods in AccountService
String follower = inboxNode.get("actor").asText(); | ||
if (requestType.equals("Follow")) { | ||
// check id | ||
if (accountRepository.findItemByAcct(id)==null) { |
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.
this will never be null.
the if else should be removed and line 99 should start with
return accountRepository.findItemByAcct(id).switchOnEmpty(Mono.error(new RuntimeException("Error: Account to follow does not exist")
.then(followersRepository.findItemById(id)
@@ -21,7 +22,7 @@ | |||
</list> | |||
</option> | |||
</component> | |||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="17" project-jdk-type="JavaSDK"> |
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.
need to stick with 17
@@ -13,6 +13,7 @@ | |||
import org.springframework.web.bind.annotation.GetMapping; | |||
import org.springframework.web.bind.annotation.PatchMapping; | |||
import org.springframework.web.bind.annotation.PathVariable; | |||
import org.springframework.web.bind.annotation.PostMapping; |
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.
reformat file to get rid of extra import and space