-
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.
createMember 컨트롤러를 생성함. 파라미터로 패스워드와 이메일 유효성 검증이 된 dto를 받음 Github issue #3
- Loading branch information
Showing
1 changed file
with
23 additions
and
1 deletion.
There are no files selected for viewing
24 changes: 23 additions & 1 deletion
24
src/main/java/beforespring/socialfeed/member/controller/MemberController.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 |
---|---|---|
@@ -1,2 +1,24 @@ | ||
package beforespring.socialfeed.member.controller;public class MemberController { | ||
package beforespring.socialfeed.member.controller; | ||
|
||
import beforespring.socialfeed.member.controller.dto.CreateMemberDto; | ||
import beforespring.socialfeed.member.service.MemberService; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Controller; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
import javax.validation.Valid; | ||
|
||
@RestController | ||
@RequiredArgsConstructor | ||
public class MemberController { | ||
|
||
private final MemberService memberService; | ||
@PostMapping("/api/member/new") | ||
public CreateMemberDto.Response createMember(@RequestBody @Valid CreateMemberDto.Request request) { | ||
Long requestId = memberService.join(request); | ||
return new CreateMemberDto.Response(requestId); | ||
} | ||
} |