-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
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.
아자뵹뵹
|
||
@RestController | ||
@RequiredArgsConstructor | ||
@RequestMapping("/api") |
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.
game관련이면 /api/game
으로 둬도 될거같은디
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.
애초에 컨트롤러 명 자체도 shortGame 이기 때문에 별도의 /game 에 대한 endpoint 를 다루지 않는다면
컨트롤러 이름과 매칭되는 역할과 endpoint Path 를 주면 좋을 것 같아요:)
private final GameService gameService; | ||
|
||
@PostMapping("/game/short") | ||
public CreateShortGameResponseDto createShortGame(@RequestBody @Valid final CreateShortGameRequestDto createShortGameRequestDto) { |
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.
오 나 @Valid
안 넣었다 .. 고맙습니다
근데 바디도 final로 넣어야하나 ..???
@@ -4,7 +4,7 @@ | |||
import java.util.Objects; | |||
|
|||
public enum GameResult { | |||
WIN, LOSE, DRAW; | |||
WIN, LOSE, DRAW, UNDECIDED; |
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.
고뇌의 흔적이 보입니다...
|
||
public Game(Couple couple) { | ||
this.couple = couple; | ||
this.enable = Boolean.TRUE; |
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.
그냥 true랑 다른 게 있나용????
.build(); | ||
} | ||
|
||
@Transactional |
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.
이거 Service 맨위에 달아줬는데 여기서도 써야하나..?!
|
||
@RestController | ||
@RequiredArgsConstructor | ||
@RequestMapping("/api") |
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.
애초에 컨트롤러 명 자체도 shortGame 이기 때문에 별도의 /game 에 대한 endpoint 를 다루지 않는다면
컨트롤러 이름과 매칭되는 역할과 endpoint Path 를 주면 좋을 것 같아요:)
✒️ 관련 이슈번호
🔑 Key Changes
📢 To Reviewers