-
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.
Browse files
Browse the repository at this point in the history
Feat #27 최초 회원가입 구현
- Loading branch information
Showing
23 changed files
with
197 additions
and
185 deletions.
There are no files selected for viewing
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,5 +1,5 @@ | ||
## 📌 관련 이슈 | ||
관련 이슈 번호 # | ||
관련 이슈 번호 # | ||
Close # | ||
|
||
|
||
|
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
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
17 changes: 0 additions & 17 deletions
17
src/main/java/com/gachtaxi/domain/members/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,29 +1,12 @@ | ||
package com.gachtaxi.domain.members.controller; | ||
|
||
import com.gachtaxi.domain.members.dto.request.UserSignUpRequestDto; | ||
import com.gachtaxi.domain.members.service.MemberService; | ||
import com.gachtaxi.global.common.response.ApiResponse; | ||
import jakarta.servlet.http.HttpServletResponse; | ||
import jakarta.validation.Valid; | ||
import lombok.RequiredArgsConstructor; | ||
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; | ||
|
||
import static com.gachtaxi.domain.members.controller.ResponseMessage.REGISTER_SUCCESS; | ||
import static org.springframework.http.HttpStatus.OK; | ||
|
||
@RequestMapping("/api/members") | ||
@RestController | ||
@RequiredArgsConstructor | ||
public class MemberController { | ||
|
||
private final MemberService memberService; | ||
|
||
@PostMapping() | ||
public ApiResponse<Void> signUp(@RequestBody @Valid UserSignUpRequestDto signUpDto, HttpServletResponse response) { | ||
memberService.saveMember(signUpDto, response); | ||
return ApiResponse.response(OK, REGISTER_SUCCESS.getMessage()); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
src/main/java/com/gachtaxi/domain/members/dto/request/MemberAgreementRequestDto.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,10 @@ | ||
package com.gachtaxi.domain.members.dto.request; | ||
|
||
import jakarta.validation.constraints.NotNull; | ||
|
||
public record MemberAgreementRequestDto( | ||
@NotNull boolean termsAgreement, | ||
@NotNull boolean privacyAgreement, | ||
@NotNull boolean marketingAgreement | ||
) { | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/com/gachtaxi/domain/members/dto/request/MemberSupplmentRequestDto.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,14 @@ | ||
package com.gachtaxi.domain.members.dto.request; | ||
|
||
import com.gachtaxi.domain.members.entity.enums.Gender; | ||
import jakarta.validation.constraints.NotBlank; | ||
import jakarta.validation.constraints.NotNull; | ||
|
||
public record MemberSupplmentRequestDto( | ||
String profilePicture, | ||
@NotBlank String nickname, | ||
@NotBlank String realName, | ||
@NotNull Long studentNumber, | ||
@NotNull Gender gender | ||
) { | ||
} |
11 changes: 11 additions & 0 deletions
11
src/main/java/com/gachtaxi/domain/members/dto/response/OauthResponse.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,11 @@ | ||
package com.gachtaxi.domain.members.dto.response; | ||
|
||
import com.gachtaxi.domain.members.controller.ResponseMessage; | ||
|
||
public record OauthResponse( | ||
String status | ||
) { | ||
public static OauthResponse from(ResponseMessage responseMessage) { | ||
return new OauthResponse(responseMessage.name()); | ||
} | ||
} |
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
12 changes: 12 additions & 0 deletions
12
src/main/java/com/gachtaxi/domain/members/exception/DuplicatedEmailException.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,12 @@ | ||
package com.gachtaxi.domain.members.exception; | ||
|
||
import com.gachtaxi.global.common.exception.BaseException; | ||
|
||
import static com.gachtaxi.domain.members.exception.ErrorMessage.DUPLICATED_EMAIL; | ||
import static org.springframework.http.HttpStatus.BAD_REQUEST; | ||
|
||
public class DuplicatedEmailException extends BaseException { | ||
public DuplicatedEmailException() { | ||
super(BAD_REQUEST, DUPLICATED_EMAIL.getMessage()); | ||
} | ||
} |
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
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
Oops, something went wrong.