Skip to content

Commit

Permalink
Merge pull request #18 from Central-MakeUs/feature/8
Browse files Browse the repository at this point in the history
Feature/8: CI/CD ํ…Œ์ŠคํŠธ ๋ฐ dev ๋ธŒ๋žœ์น˜ ์ตœ์‹ ํ™”
  • Loading branch information
yxhwxn authored Jul 30, 2024
2 parents 014c4f2 + c54ccb6 commit 403c1ee
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 3 deletions.
54 changes: 53 additions & 1 deletion src/main/java/com/cmc/suppin/member/controller/MemberApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ public class MemberApi {

private final MemberCommandService memberCommandService;

// ํšŒ์›๊ฐ€์ž…
/**
* ํšŒ์›๊ฐ€์ž…
*/
@PostMapping("/join")
@Operation(summary = "ํšŒ์›๊ฐ€์ž… API", description = "request ํŒŒ๋ผ๋ฏธํ„ฐ : id, password, name, phone, email")
public ApiResponse<MemberResponseDTO.JoinResultDTO> join(@RequestBody @Valid MemberRequestDTO.JoinDTO request) {
Expand Down Expand Up @@ -55,6 +57,9 @@ public ApiResponse<Void> deleteMember(@AuthenticationPrincipal MemberDetails mem
return ApiResponse.onSuccess(null, SuccessStatus.MEMBER_DELETE_SUCCESS);
}

/**
* TODO: ๋กœ๊ทธ์ธ, ๋กœ๊ทธ์•„์›ƒ, ๋น„๋ฐ€๋ฒˆํ˜ธ ๋ณ€๊ฒฝ, ํšŒ์›์ •๋ณด ์ƒ์„ธ ์กฐํšŒ, ํšŒ์›์ •๋ณด ์ˆ˜์ • API
*/
// ๋กœ๊ทธ์ธ
@PostMapping("/login")
@Operation(summary = "๋กœ๊ทธ์ธ API", description = "request : userId, password")
Expand All @@ -63,4 +68,51 @@ public ApiResponse<MemberResponseDTO.LoginResponseDTO> login(@RequestBody @Valid
return ApiResponse.onSuccess(response, SuccessStatus.MEMBER_LOGIN_SUCCESS);
}


// // ๋กœ๊ทธ์•„์›ƒ
// @PostMapping("/logout")
// @Operation(summary = "๋กœ๊ทธ์•„์›ƒ API", description = "JWT ํ† ํฐ์„ ํ—ค๋”์— ํฌํ•จ์‹œ์ผœ ๋ณด๋‚ด์ฃผ์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.")
// public ApiResponse<Void> logout(@AuthenticationPrincipal MemberDetails memberDetails) {
// if (memberDetails == null) {
// return ApiResponse.onFailure("403", "์ธ์ฆ๋œ ์‚ฌ์šฉ์ž๋งŒ ๋กœ๊ทธ์•„์›ƒํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.", null);
// }
// memberCommandService.logout(memberDetails.getUserId());
// return ApiResponse.onSuccess(null, SuccessStatus.MEMBER_LOGOUT_SUCCESS);
// }
//
// // ๋น„๋ฐ€๋ฒˆํ˜ธ ๋ณ€๊ฒฝ
// @PutMapping("/changePassword")
// @Operation(summary = "๋น„๋ฐ€๋ฒˆํ˜ธ ๋ณ€๊ฒฝ API", description = "request : userId, password, newPassword")
// public ApiResponse<Void> changePassword(@AuthenticationPrincipal MemberDetails memberDetails, @RequestBody @Valid MemberRequestDTO.ChangePasswordDTO request) {
// if (memberDetails == null) {
// return ApiResponse.onFailure("403", "์ธ์ฆ๋œ ์‚ฌ์šฉ์ž๋งŒ ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ๋ณ€๊ฒฝํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.", null);
// }
// memberCommandService.changePassword(memberDetails.getUserId(), request);
// return ApiResponse.onSuccess(null, SuccessStatus.MEMBER_CHANGE_PASSWORD_SUCCESS);
// }
//
// // ํšŒ์›์ •๋ณด ์ƒ์„ธ ์กฐํšŒ(๋งˆ์ดํŽ˜์ด์ง€)
// @GetMapping("/info")
// @Operation(summary = "ํšŒ์›์ •๋ณด ์ƒ์„ธ ์กฐํšŒ API", description = "JWT ํ† ํฐ์„ ํ—ค๋”์— ํฌํ•จ์‹œ์ผœ ๋ณด๋‚ด์ฃผ์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.")
// public ApiResponse<MemberResponseDTO.MemberInfoDTO> getMemberInfo(@AuthenticationPrincipal MemberDetails memberDetails) {
// if (memberDetails == null) {
// return ApiResponse.onFailure("403", "์ธ์ฆ๋œ ์‚ฌ์šฉ์ž๋งŒ ์กฐํšŒํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.", null);
// }
// Member member = memberCommandService.getMemberInfo(memberDetails.getUserId());
// return ApiResponse.onSuccess(MemberConverter.toMemberInfoDTO(member), SuccessStatus.MEMBER_INFO_SUCCESS);
// }
//
// // ํšŒ์›์ •๋ณด ์ˆ˜์ •
// @PutMapping("/info/update")
// @Operation(summary = "ํšŒ์›์ •๋ณด ์ˆ˜์ • API", description = "request : userId, name, phone, email")
// public ApiResponse<Void> updateMemberInfo(@AuthenticationPrincipal MemberDetails memberDetails, @RequestBody @Valid MemberRequestDTO.UpdateMemberInfoDTO request) {
// if (memberDetails == null) {
// return ApiResponse.onFailure("403", "์ธ์ฆ๋œ ์‚ฌ์šฉ์ž๋งŒ ์ˆ˜์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.", null);
// }
// memberCommandService.updateMemberInfo(memberDetails.getUserId(), request);
// return ApiResponse.onSuccess(null, SuccessStatus.MEMBER_UPDATE_SUCCESS);
// }

// TODO: ์•„์ด๋”” ์ฐพ๊ธฐ, ๋น„๋ฐ€๋ฒˆํ˜ธ ์ฐพ๊ธฐ API ๊ตฌํ˜„ ํ•„์š”

}
4 changes: 3 additions & 1 deletion src/main/java/com/cmc/suppin/member/domain/Member.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ public class Member extends BaseDateTimeEntity {
@Column(columnDefinition = "VARCHAR(30)", nullable = false)
private String email;

@Column(columnDefinition = "VARCHAR(20)", nullable = false)
@Column(columnDefinition = "VARCHAR(255)", nullable = false)
private String password;

@Column(columnDefinition = "VARCHAR(13)", nullable = false)
private String phoneNumber;

private Boolean termsAgree;

private String role;

// ์ถ”๊ฐ€๋œ ์ƒ์„ฑ์ž
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spring:
driver-class-name: com.mysql.cj.jdbc.Driver
jpa:
hibernate:
ddl-auto: update
ddl-auto: create
properties:
hibernate:
dialect: org.hibernate.dialect.MySQL8Dialect
Expand Down

0 comments on commit 403c1ee

Please sign in to comment.