-
Notifications
You must be signed in to change notification settings - Fork 0
feat(Friend): 친구 CRUD 기능 추가 #19
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
Open
mk3058
wants to merge
20
commits into
dev
Choose a base branch
from
feat/#17
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 16 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
a4828f9
feat(Friend): 친구 CRUD 기능 추가
mk3058 a1104fd
feat(FriendController): spring security를 통해 user 정보를 얻도록 수정
mk3058 0a6813f
refactor(FriendController): ResponseEntity의 .ok() 메서드를 사용하도록 간소화
mk3058 deb227c
refactor(FriendResponse): dto가 record 구조를 사용하도록 리팩터링
mk3058 2c23ad5
chore(gitignore): .gitignore에 로그파일 추가
mk3058 e9c18b2
refactor(Friend): 생성자의 접근 레벨을 private으로 변경, 예외처리 추가
mk3058 6c1498d
feat(Invite): invite 엔터티 추가
mk3058 98f3bc1
feat(Invite): dto 추가
mk3058 87098e5
refactor(friend): invite 테이블이 친구 요청을 관리하도록 수정
mk3058 d8e9ecb
fix(FriendService): transaction 적용
mk3058 c250359
feat(CustomOAuth2User): getter 추가
mk3058 c2685f2
refactor(FriendController): findAllRequest 메서드의 타입 검사에 switch-case문을 …
mk3058 a07298b
feat(InviteResponse): id 필드 추가
mk3058 9fa4748
fix(FriendRequest): 친구 요청 조회시 WAIT 상태인 요청만 응답하도록 수정
mk3058 6a2419d
refactor(FriendResponse): 친구 목록 조회시 인증 주체의 정보는 반환하지 않도록 수정
mk3058 2e2474b
feat(FriendService): 예외처리 추가
mk3058 24633c4
feat(entities): User 엔터티를 지연로딩 하도록 수정
mk3058 a3e550d
feat(FriendService): inviter와 invitee가 같을때 예외처리 추가
mk3058 7ce77a4
refactor(FriendController): 엔터티->Dto 변환이 Service에서 이루어지도록 수정
mk3058 f389632
feat(Repository): User 엔터티를 fetch-join 하도록 수정
mk3058 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
91 changes: 91 additions & 0 deletions
91
src/main/java/com/sequence/anonymous/friend/application/FriendService.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| package com.sequence.anonymous.friend.application; | ||
|
|
||
| import com.google.common.base.Preconditions; | ||
| import com.sequence.anonymous.friend.domain.Friend; | ||
| import com.sequence.anonymous.friend.domain.repository.FriendRepository; | ||
| import com.sequence.anonymous.invite.domain.Invite; | ||
| import com.sequence.anonymous.invite.domain.Kind; | ||
| import com.sequence.anonymous.invite.domain.Status; | ||
| import com.sequence.anonymous.invite.domain.repository.InviteRepository; | ||
| import com.sequence.anonymous.user.domain.repository.UserRepository; | ||
| import com.sequence.anonymous.user.domain.user.User; | ||
| import java.util.List; | ||
| import java.util.Optional; | ||
| import lombok.RequiredArgsConstructor; | ||
| import org.springframework.stereotype.Service; | ||
| import org.springframework.transaction.annotation.Transactional; | ||
| import org.webjars.NotFoundException; | ||
|
|
||
| @Service | ||
| @RequiredArgsConstructor | ||
| public class FriendService { | ||
|
|
||
| private final FriendRepository friendRepository; | ||
|
|
||
| private final UserRepository userRepository; | ||
|
|
||
| private final InviteRepository inviteRepository; | ||
|
|
||
| @Transactional(readOnly = true) | ||
| public List<Friend> findFriendsByUserId(Long userId) { | ||
| return friendRepository.findByUserId(userId); | ||
| } | ||
|
|
||
| @Transactional(readOnly = true) | ||
| public List<Invite> findRequestsByInviterId(Long inviterId) { | ||
| return inviteRepository.findByInviterIdAndStatus(inviterId, Status.WAIT); | ||
| } | ||
|
|
||
| @Transactional(readOnly = true) | ||
| public List<Invite> findRequestsByInviteeId(Long inviteeId) { | ||
| return inviteRepository.findByInviteeIdAndStatus(inviteeId, Status.WAIT); | ||
| } | ||
|
|
||
| @Transactional | ||
| public void createNewRequest(Long inviterId, Long inviteeId) { | ||
| Optional<Invite> optionalInvite = inviteRepository.findByInviterIdAndInviteeIdAndStatus( | ||
| inviterId, | ||
| inviteeId, Status.WAIT); | ||
| optionalInvite.ifPresent(invite -> { | ||
| throw new RuntimeException("duplicate request"); | ||
| }); | ||
|
|
||
| Optional<Friend> optionalFriend = friendRepository.findByUserIdAndFriendId(inviterId, | ||
| inviteeId); | ||
| optionalFriend.ifPresent(friend -> { | ||
| throw new RuntimeException("already a friend"); | ||
| }); | ||
|
|
||
| User inviter = userRepository.findById(inviterId) | ||
| .orElseThrow(() -> new NotFoundException("inviter not found")); | ||
| User invitee = userRepository.findById(inviteeId) | ||
| .orElseThrow(() -> new NotFoundException("invitee not found")); | ||
|
|
||
| inviteRepository.save(new Invite(inviter, invitee, Kind.FRIEND)); | ||
| } | ||
ckyeon marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| @Transactional | ||
| public void acceptRequest(Long id) { | ||
| Invite invite = inviteRepository.findById(id) | ||
| .orElseThrow(() -> new NotFoundException("invite request not found")); | ||
| Preconditions.checkArgument(invite.getStatus() != Status.DONE, "request has already been processed"); | ||
|
|
||
| friendRepository.save(new Friend(invite.getInviter(), invite.getInvitee())); | ||
| friendRepository.save(new Friend(invite.getInvitee(), invite.getInviter())); | ||
| invite.markAsDone(); | ||
| } | ||
|
|
||
| @Transactional | ||
| public void dismissRequest(Long id) { | ||
| Invite invite = inviteRepository.findById(id) | ||
| .orElseThrow(() -> new NotFoundException("invite request not found")); | ||
| Preconditions.checkArgument(invite.getStatus() != Status.DONE, "request has already been processed"); | ||
|
|
||
| invite.markAsDone(); | ||
| } | ||
ckyeon marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| @Transactional | ||
| public void deleteById(Long id) { | ||
| friendRepository.deleteById(id); | ||
| } | ||
| } | ||
42 changes: 42 additions & 0 deletions
42
src/main/java/com/sequence/anonymous/friend/domain/Friend.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| package com.sequence.anonymous.friend.domain; | ||
|
|
||
| import com.google.common.base.Preconditions; | ||
| import com.sequence.anonymous.user.domain.user.User; | ||
| import jakarta.persistence.Column; | ||
| import jakarta.persistence.Entity; | ||
| import jakarta.persistence.EnumType; | ||
| import jakarta.persistence.Enumerated; | ||
| import jakarta.persistence.GeneratedValue; | ||
| import jakarta.persistence.GenerationType; | ||
| import jakarta.persistence.Id; | ||
| import jakarta.persistence.JoinColumn; | ||
| import jakarta.persistence.ManyToOne; | ||
| import lombok.AccessLevel; | ||
| import lombok.Getter; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| @Entity | ||
| @Getter | ||
| @NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
| public class Friend { | ||
|
|
||
| @Id | ||
| @GeneratedValue(strategy = GenerationType.IDENTITY) | ||
| private Long id; | ||
|
|
||
| @ManyToOne | ||
| @JoinColumn(name = "user_id") | ||
| private User user; | ||
|
|
||
| @ManyToOne | ||
| @JoinColumn(name = "friend_id") | ||
| private User friend; | ||
ckyeon marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| public Friend(User user, User friend) { | ||
| Preconditions.checkArgument(user != null, "user must be provided"); | ||
| Preconditions.checkArgument(friend != null, "friend must be provided"); | ||
|
|
||
| this.user = user; | ||
| this.friend = friend; | ||
| } | ||
| } | ||
19 changes: 19 additions & 0 deletions
19
src/main/java/com/sequence/anonymous/friend/domain/repository/FriendRepository.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| package com.sequence.anonymous.friend.domain.repository; | ||
|
|
||
| import com.sequence.anonymous.friend.domain.Friend; | ||
| import com.sequence.anonymous.user.domain.user.User; | ||
| import jakarta.persistence.criteria.From; | ||
| import java.util.Formattable; | ||
| import java.util.List; | ||
| import java.util.Optional; | ||
| import org.springframework.data.jpa.repository.JpaRepository; | ||
| import org.springframework.data.jpa.repository.Query; | ||
| import org.springframework.stereotype.Repository; | ||
|
|
||
| @Repository | ||
| public interface FriendRepository extends JpaRepository<Friend, Long> { | ||
|
|
||
| List<Friend> findByUserId(Long userId); | ||
|
|
||
| Optional<Friend> findByUserIdAndFriendId(Long userId, Long friendId); | ||
| } |
84 changes: 84 additions & 0 deletions
84
src/main/java/com/sequence/anonymous/friend/presentation/FriendController.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| package com.sequence.anonymous.friend.presentation; | ||
|
|
||
| import com.sequence.anonymous.friend.application.FriendService; | ||
| import com.sequence.anonymous.friend.domain.Friend; | ||
| import com.sequence.anonymous.friend.presentation.dto.FriendResponse; | ||
| import com.sequence.anonymous.invite.domain.Invite; | ||
| import com.sequence.anonymous.invite.presentation.dto.InviteResponse; | ||
| import com.sequence.anonymous.security.CustomOAuth2User; | ||
| import java.util.List; | ||
| import lombok.RequiredArgsConstructor; | ||
| import org.springframework.http.ResponseEntity; | ||
| import org.springframework.security.core.annotation.AuthenticationPrincipal; | ||
| import org.springframework.web.bind.annotation.DeleteMapping; | ||
| import org.springframework.web.bind.annotation.GetMapping; | ||
| import org.springframework.web.bind.annotation.PathVariable; | ||
| import org.springframework.web.bind.annotation.PostMapping; | ||
| import org.springframework.web.bind.annotation.RequestMapping; | ||
| import org.springframework.web.bind.annotation.RequestParam; | ||
| import org.springframework.web.bind.annotation.RestController; | ||
|
|
||
| @RestController | ||
| @RequiredArgsConstructor | ||
| @RequestMapping("/users/friends") | ||
| public class FriendController { | ||
|
|
||
| private final FriendService friendService; | ||
|
|
||
| @GetMapping("") | ||
| public ResponseEntity<List<FriendResponse>> findAllFriends( | ||
| @AuthenticationPrincipal CustomOAuth2User user) { | ||
| Long userId = user.getId(); | ||
|
|
||
| List<Friend> friendList = friendService.findFriendsByUserId(userId); | ||
| List<FriendResponse> friendResponseList = friendList.stream() | ||
| .map(FriendResponse::fromFriend) | ||
| .toList(); | ||
| return ResponseEntity.ok(friendResponseList); | ||
| } | ||
|
|
||
| @DeleteMapping("/{id}") | ||
| public ResponseEntity<Void> deleteFriend(@PathVariable Long id) { | ||
| friendService.deleteById(id); | ||
| return ResponseEntity.ok().build(); | ||
| } | ||
|
|
||
| @PostMapping("/invites/{id}/accept") | ||
| public ResponseEntity<Void> acceptRequest(@PathVariable Long id) { | ||
| friendService.acceptRequest(id); | ||
| return ResponseEntity.ok().build(); | ||
| } | ||
|
|
||
| @PostMapping("/invites/{id}/dismiss") | ||
| public ResponseEntity<Void> dismissRequest(@PathVariable Long id) { | ||
| friendService.dismissRequest(id); | ||
| return ResponseEntity.ok().build(); | ||
| } | ||
|
|
||
| @PostMapping("/{id}/invitation") | ||
| public ResponseEntity<Void> createNewRequest(@PathVariable Long id, | ||
| @AuthenticationPrincipal CustomOAuth2User user) { | ||
| Long userId = user.getId(); | ||
|
|
||
| friendService.createNewRequest(userId, id); | ||
| return ResponseEntity.ok().build(); | ||
| } | ||
|
|
||
| @GetMapping("/invites") | ||
| public ResponseEntity<List<InviteResponse>> findAllRequests( | ||
| @AuthenticationPrincipal CustomOAuth2User user, @RequestParam RequestType type) { | ||
| Long userId = user.getId(); | ||
| List<Invite> inviteList; | ||
|
|
||
| switch (type) { | ||
| case SENT -> inviteList = friendService.findRequestsByInviterId(userId); | ||
| case RECEIVED -> inviteList = friendService.findRequestsByInviteeId(userId); | ||
| default -> throw new IllegalArgumentException("invalid request type: " + type.toString()); | ||
| } | ||
|
|
||
| List<InviteResponse> inviteResponseList = inviteList.stream() | ||
| .map(InviteResponse::fromInvite) | ||
| .toList(); | ||
ckyeon marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| return ResponseEntity.ok(inviteResponseList); | ||
| } | ||
| } | ||
5 changes: 5 additions & 0 deletions
5
src/main/java/com/sequence/anonymous/friend/presentation/RequestType.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| package com.sequence.anonymous.friend.presentation; | ||
|
|
||
| public enum RequestType { | ||
| SENT, RECEIVED | ||
| } |
18 changes: 18 additions & 0 deletions
18
src/main/java/com/sequence/anonymous/friend/presentation/dto/FriendResponse.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| package com.sequence.anonymous.friend.presentation.dto; | ||
|
|
||
| import com.google.common.base.Preconditions; | ||
| import com.sequence.anonymous.friend.domain.Friend; | ||
| import com.sequence.anonymous.user.domain.user.User; | ||
|
|
||
| public record FriendResponse (Long id, User friend) { | ||
|
|
||
| public FriendResponse { | ||
| Preconditions.checkArgument(friend != null, "friend must be provided"); | ||
| } | ||
|
|
||
| public static FriendResponse fromFriend(Friend friend) { | ||
| Preconditions.checkArgument(friend != null, "friend must be provided"); | ||
|
|
||
| return new FriendResponse(friend.getId(), friend.getFriend()); | ||
| } | ||
| } |
63 changes: 63 additions & 0 deletions
63
src/main/java/com/sequence/anonymous/invite/domain/Invite.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| package com.sequence.anonymous.invite.domain; | ||
|
|
||
| import com.google.common.base.Preconditions; | ||
| import com.sequence.anonymous.user.domain.user.User; | ||
| import jakarta.persistence.Column; | ||
| import jakarta.persistence.Entity; | ||
| import jakarta.persistence.EnumType; | ||
| import jakarta.persistence.Enumerated; | ||
| import jakarta.persistence.GeneratedValue; | ||
| import jakarta.persistence.GenerationType; | ||
| import jakarta.persistence.Id; | ||
| import jakarta.persistence.JoinColumn; | ||
| import jakarta.persistence.ManyToOne; | ||
| import lombok.AccessLevel; | ||
| import lombok.Getter; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| @Entity | ||
| @Getter | ||
| @NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
| public class Invite { | ||
|
|
||
| @Id | ||
| @GeneratedValue(strategy = GenerationType.IDENTITY) | ||
| private Long id; | ||
|
|
||
| @ManyToOne | ||
| @JoinColumn(name = "inviter_id") | ||
| private User inviter; | ||
|
|
||
| @ManyToOne | ||
| @JoinColumn(name = "invitee_id") | ||
| private User invitee; | ||
ckyeon marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| @Enumerated(EnumType.STRING) | ||
| @Column(length = 15) | ||
| private Kind kind; | ||
|
|
||
| @Enumerated(EnumType.STRING) | ||
| @Column(length = 10) | ||
| private Status status; | ||
|
|
||
| public Invite(User inviter, User invitee, Kind kind) { | ||
| this(inviter, invitee, kind, Status.WAIT); | ||
| } | ||
|
|
||
| private Invite(User inviter, User invitee, Kind kind, Status status) { | ||
| Preconditions.checkArgument(inviter != null, "inviter must be provided"); | ||
| Preconditions.checkArgument(invitee != null, "invitee must be provided"); | ||
| Preconditions.checkArgument(kind != null, "kind must be provided"); | ||
| Preconditions.checkArgument(status != null, "status must be provided"); | ||
| Preconditions.checkArgument(status != Status.DONE, "initial value of status cannot be DONE"); | ||
|
|
||
| this.inviter = inviter; | ||
| this.invitee = invitee; | ||
| this.kind = kind; | ||
| this.status = status; | ||
| } | ||
|
|
||
| public void markAsDone() { | ||
| this.status = Status.DONE; | ||
| } | ||
| } | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| package com.sequence.anonymous.invite.domain; | ||
|
|
||
| public enum Kind { | ||
| MATCH_POST, FRIEND | ||
| } |
5 changes: 5 additions & 0 deletions
5
src/main/java/com/sequence/anonymous/invite/domain/Status.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| package com.sequence.anonymous.invite.domain; | ||
|
|
||
| public enum Status { | ||
| WAIT, DONE | ||
| } |
19 changes: 19 additions & 0 deletions
19
src/main/java/com/sequence/anonymous/invite/domain/repository/InviteRepository.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| package com.sequence.anonymous.invite.domain.repository; | ||
|
|
||
| import com.sequence.anonymous.invite.domain.Invite; | ||
| import com.sequence.anonymous.invite.domain.Status; | ||
| import java.util.List; | ||
| import java.util.Optional; | ||
| import org.springframework.data.jpa.repository.JpaRepository; | ||
| import org.springframework.stereotype.Repository; | ||
|
|
||
| @Repository | ||
| public interface InviteRepository extends JpaRepository<Invite, Long> { | ||
|
|
||
| List<Invite> findByInviterIdAndStatus(Long inviterId, Status status); | ||
|
|
||
| List<Invite> findByInviteeIdAndStatus(Long inviteeId, Status status); | ||
|
|
||
| Optional<Invite> findByInviterIdAndInviteeIdAndStatus(Long inviterId, Long inviteeId, Status status); | ||
|
|
||
| } |
25 changes: 25 additions & 0 deletions
25
src/main/java/com/sequence/anonymous/invite/presentation/dto/InviteResponse.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| package com.sequence.anonymous.invite.presentation.dto; | ||
|
|
||
| import com.google.common.base.Preconditions; | ||
| import com.sequence.anonymous.invite.domain.Invite; | ||
| import com.sequence.anonymous.invite.domain.Kind; | ||
| import com.sequence.anonymous.invite.domain.Status; | ||
| import com.sequence.anonymous.user.domain.user.User; | ||
|
|
||
| public record InviteResponse (Long id, User inviter, User invitee, Kind kind, Status status){ | ||
|
|
||
| public InviteResponse { | ||
| Preconditions.checkArgument(id != null, "id must be provided"); | ||
| Preconditions.checkArgument(inviter!=null, "inviter must be provided"); | ||
| Preconditions.checkArgument(invitee!=null, "invitee must be provided"); | ||
| Preconditions.checkArgument(kind!=null, "kind must be provided"); | ||
| Preconditions.checkArgument(status != null, "status must be provided"); | ||
| } | ||
|
|
||
| public static InviteResponse fromInvite(Invite invite) { | ||
| Preconditions.checkArgument(invite != null); | ||
|
|
||
| return new InviteResponse(invite.getId(), invite.getInviter(), invite.getInvitee(), invite.getKind(), | ||
| invite.getStatus()); | ||
| } | ||
| } |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.