Skip to content

Commit

Permalink
Feat/81 (#83)
Browse files Browse the repository at this point in the history
* feat(#81): 의사/센터 앱에서 환자 무드 및 차트 조회 기능 추가

* refactor(#81): 메소드 파라미터 리팩토링

* refactor(#81): url endpoint 리팩토링
  • Loading branch information
lsm-del authored May 23, 2024
1 parent 0d40a83 commit 48615af
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,25 @@ public ResponseEntity<ApiSuccessResponse<List<MoodPercentResponseDto>>> getMoodC
@AuthenticationPrincipal UserDetailsImpl userDetails) {
return ResponseEntity.ok(
new ApiSuccessResponse<>(moodChartService.getActivityChart(userDetails.getMemberId())));

}

@Operation(
summary = "의사/센터의 특정 환자의 기분 별 활동 차트 안의 기분 percent 조회"
)
@ApiResponse(
responseCode = "200", description = "기분 별 활동 차트 안의 기분 percent 조회 성공 응답입니다.", useReturnTypeSchema = true
)
@GetMapping("/percents/{memberId}")
public ResponseEntity<ApiSuccessResponse<List<MoodPercentResponseDto>>> getMoodChartPercents(
@AuthenticationPrincipal UserDetailsImpl userDetails,
@PathVariable("memberId") Long memberId) {
return ResponseEntity.ok(
new ApiSuccessResponse<>(moodChartService.getActivityChart(memberId)));

}


@Operation(
summary = "의사/센터의 특정 환자의 기분 별 활동 차트 안의 기분 percent 조회"
)
Expand Down Expand Up @@ -116,7 +133,7 @@ public ResponseEntity<ApiSuccessResponse<List<ActivityPercentResponseDto>>> getA
@ApiResponse(
responseCode = "200", description = "특정 기분에 대한 활동 퍼센트 조회 성공 응답입니다.", useReturnTypeSchema = true
)
@GetMapping("/percent/activity")
@GetMapping("/connection/percent/activity")
public ResponseEntity<ApiSuccessResponse<List<ActivityPercentResponseDto>>> getActivityPercentChart(
@AuthenticationPrincipal UserDetailsImpl userDetails,
@Parameter(description = "감정") @RequestParam("feelingType") FeelingType feelingType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ private RequestMatcher[] authorizeRequestMathcers() {
antMatcher(GET, "/mood/chart/percents"),
antMatcher(GET, "/mood/chart/percents/{memberId}"),
antMatcher(GET, "/mood/chart/percent/activity"),
antMatcher(GET, "/mood/chart/connection/percent/activity"),
antMatcher(POST, "/prescription/relation/request"),
antMatcher(POST, "/prescription/relation/accept"),
antMatcher(GET, "/prescription"),
Expand Down

0 comments on commit 48615af

Please sign in to comment.