-
Notifications
You must be signed in to change notification settings - Fork 1
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
* Refac: yml 분리 규칙 변경(프로필 -> 기능) * Fix: 테스트 워크플로, 환경변수 수정 * Fix: dev 서버 배포 워크플로 수정 * Fix: main 서버 배포 워크플로 수정 * Refac: PK 네이밍 규칙 통일 * Refac: User 관련 예외처리 코드 통일 * Refac: 지원서(admin) 관련 예외처리 코드 통일 * Refac: response dto(member, team) 클래스 위치 변경 * Fix: dto getter 추가 * Feat: health check 엔드포인트 생성
- Loading branch information
1 parent
bb0c4ae
commit b5b0abf
Showing
32 changed files
with
278 additions
and
178 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
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
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 |
---|---|---|
|
@@ -36,6 +36,5 @@ out/ | |
### VS Code ### | ||
.vscode/ | ||
|
||
/src/main/resources/**/*.yml | ||
src/main/resources/static/index.html | ||
.env |
12 changes: 12 additions & 0 deletions
12
src/main/java/com/gdsc_knu/official_homepage/controller/HealthCheckController.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.gdsc_knu.official_homepage.controller; | ||
|
||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@RestController | ||
public class HealthCheckController { | ||
@GetMapping("/check") | ||
public String healthCheck(){ | ||
return "status up"; | ||
} | ||
} |
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
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
66 changes: 46 additions & 20 deletions
66
src/main/java/com/gdsc_knu/official_homepage/dto/member/MemberResponse.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,31 +1,57 @@ | ||
package com.gdsc_knu.official_homepage.dto.member; | ||
|
||
import com.gdsc_knu.official_homepage.dto.team.TeamResponse; | ||
import com.gdsc_knu.official_homepage.entity.Member; | ||
import com.gdsc_knu.official_homepage.entity.enumeration.Role; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.List; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
public class MemberResponse { | ||
private String name; | ||
private String profileUrl; | ||
private int age; | ||
private String major; | ||
private String studentNumber; | ||
private String email; | ||
private Role role; | ||
private List<TeamInfoResponse> teamInfos; | ||
public MemberResponse(Member member, List<TeamInfoResponse> teamInfos){ | ||
this.name = member.getName(); | ||
this.profileUrl = member.getProfileUrl(); | ||
this.age = member.getAge(); | ||
this.major = member.getMajor(); | ||
this.studentNumber = member.getStudentNumber(); | ||
this.email = member.getEmail(); | ||
this.role = member.getRole(); | ||
this.teamInfos = teamInfos; | ||
@Getter | ||
@Builder | ||
@AllArgsConstructor | ||
public static class Main { | ||
private String name; | ||
private String profileUrl; | ||
private int age; | ||
private String major; | ||
private String studentNumber; | ||
private String email; | ||
private Role role; | ||
private List<TeamResponse.Main> teamInfos; | ||
public static MemberResponse.Main from (Member member) { | ||
return Main.builder() | ||
.name(member.getName()) | ||
.profileUrl(member.getProfileUrl()) | ||
.age(member.getAge()) | ||
.major(member.getMajor()) | ||
.studentNumber(member.getStudentNumber()) | ||
.email(member.getEmail()) | ||
.role(member.getRole()) | ||
.teamInfos(member.getTeams().stream() | ||
.map(TeamResponse.Main::from) | ||
.toList()) | ||
.build(); | ||
} | ||
} | ||
|
||
@Getter | ||
@Builder | ||
@AllArgsConstructor | ||
public static class WithTrack { | ||
private Long id; | ||
private String name; | ||
private String track; | ||
|
||
public static WithTrack from(Member member) { | ||
return WithTrack.builder() | ||
.id(member.getId()) | ||
.name(member.getName()) | ||
.track(member.getTrack().name()) | ||
.build(); | ||
} | ||
} | ||
} |
28 changes: 0 additions & 28 deletions
28
src/main/java/com/gdsc_knu/official_homepage/dto/member/TeamInfoResponse.java
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
src/main/java/com/gdsc_knu/official_homepage/dto/role/UserRoleRequest.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.