Skip to content
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

[feat] 한판승부 생성하기 API 구현 #33

Merged
merged 9 commits into from
Jul 12, 2023

Conversation

jiyeoon00
Copy link
Member

✒️ 관련 이슈번호

🔑 Key Changes

  1. 한판 승부 생성
  2. 해당 승부의 소원권을 생성
  3. 승부 생성 시 이미 생성된 승부가 있을 경우 에러 처리

📢 To Reviewers

  • 🖤

@jiyeoon00 jiyeoon00 added feat 새로운 기능 추가 지연🐰 지연이가 작업함! labels Jul 12, 2023
@jiyeoon00 jiyeoon00 requested a review from a team as a code owner July 12, 2023 05:49
@jiyeoon00 jiyeoon00 requested review from jinsu4755 and 2zerozu and removed request for a team July 12, 2023 05:49
Copy link
Collaborator

@2zerozu 2zerozu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아자뵹뵹


@RestController
@RequiredArgsConstructor
@RequestMapping("/api")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

game관련이면 /api/game으로 둬도 될거같은디

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

애초에 컨트롤러 명 자체도 shortGame 이기 때문에 별도의 /game 에 대한 endpoint 를 다루지 않는다면

컨트롤러 이름과 매칭되는 역할과 endpoint Path 를 주면 좋을 것 같아요:)

private final GameService gameService;

@PostMapping("/game/short")
public CreateShortGameResponseDto createShortGame(@RequestBody @Valid final CreateShortGameRequestDto createShortGameRequestDto) {
Copy link
Collaborator

@2zerozu 2zerozu Jul 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 나 @Valid 안 넣었다 .. 고맙습니다
근데 바디도 final로 넣어야하나 ..???

@@ -4,7 +4,7 @@
import java.util.Objects;

public enum GameResult {
WIN, LOSE, DRAW;
WIN, LOSE, DRAW, UNDECIDED;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고뇌의 흔적이 보입니다...


public Game(Couple couple) {
this.couple = couple;
this.enable = Boolean.TRUE;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그냥 true랑 다른 게 있나용????

.build();
}

@Transactional
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이거 Service 맨위에 달아줬는데 여기서도 써야하나..?!

@github-actions
Copy link

github-actions bot commented Jul 12, 2023

Unit Test Results

5 tests   5 ✔️  9s ⏱️
1 suites  0 💤
1 files    0

Results for commit 1c71ef3.

♻️ This comment has been updated with latest results.


@RestController
@RequiredArgsConstructor
@RequestMapping("/api")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

애초에 컨트롤러 명 자체도 shortGame 이기 때문에 별도의 /game 에 대한 endpoint 를 다루지 않는다면

컨트롤러 이름과 매칭되는 역할과 endpoint Path 를 주면 좋을 것 같아요:)

@jiyeoon00 jiyeoon00 merged commit b702624 into develop Jul 12, 2023
2 checks passed
@2zerozu 2zerozu deleted the feature/#21-shortGame branch July 12, 2023 10:03
@2zerozu 2zerozu added the pull request🔥 Good for newcomers label Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat 새로운 기능 추가 pull request🔥 Good for newcomers size/L 지연🐰 지연이가 작업함!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feat] 한판승부 생성하기 API 구현
3 participants