-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- AuthMember와 InfoWriteRequest를 이용한 컨트롤러 메서드 작성
- Loading branch information
1 parent
9428724
commit 082e140
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
src/main/java/com/atwoz/member/ui/info/InfoController.java
This file contains 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,29 @@ | ||
package com.atwoz.member.ui.info; | ||
|
||
import com.atwoz.member.application.info.InfoService; | ||
import com.atwoz.member.application.info.dto.InfoWriteRequest; | ||
import com.atwoz.member.ui.auth.support.auth.AuthMember; | ||
import jakarta.validation.Valid; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@RequiredArgsConstructor | ||
@RequestMapping("/api/info") | ||
@RestController | ||
public class InfoController { | ||
|
||
private final InfoService infoService; | ||
|
||
@PostMapping | ||
public ResponseEntity<Void> writeInfo(@AuthMember final Long memberId, | ||
@Valid @RequestBody final InfoWriteRequest request) { | ||
infoService.writeProfile(memberId, request); | ||
return ResponseEntity.ok() | ||
.build(); | ||
} | ||
|
||
} |