Skip to content

Commit 04afabb

Browse files
committed
chore: 전반적으로 로직 수정
- 통일성 있게 .ok(response) 사용 - 단일 객체는 단수형(response) 사용
1 parent 37fce94 commit 04afabb

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/main/java/com/example/solidconnection/mentor/controller/MentoringController.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import com.example.solidconnection.siteuser.domain.SiteUser;
1414
import jakarta.validation.Valid;
1515
import lombok.RequiredArgsConstructor;
16-
import org.springframework.http.HttpStatus;
1716
import org.springframework.http.ResponseEntity;
1817
import org.springframework.web.bind.annotation.GetMapping;
1918
import org.springframework.web.bind.annotation.PatchMapping;
@@ -39,9 +38,7 @@ public ResponseEntity<MentoringApplyResponse> applyMentoring(
3938
@Valid @RequestBody MentoringApplyRequest mentoringApplyRequest
4039
) {
4140
MentoringApplyResponse response = mentoringCommandService.applyMentoring(siteUser.getId(), mentoringApplyRequest);
42-
return ResponseEntity
43-
.status(HttpStatus.OK)
44-
.body(response);
41+
return ResponseEntity.ok(response);
4542
}
4643

4744
// TODO: RequireRoleAccess 어노테이션 추가 필요
@@ -76,7 +73,7 @@ public ResponseEntity<MentoringCheckResponse> checkMentoring(
7673
public ResponseEntity<MentoringCountResponse> getNewMentoringsCount(
7774
@AuthorizedUser SiteUser siteUser
7875
) {
79-
MentoringCountResponse responses = mentoringQueryService.getNewMentoringsCount(siteUser.getId());
80-
return ResponseEntity.ok(responses);
76+
MentoringCountResponse response = mentoringQueryService.getNewMentoringsCount(siteUser.getId());
77+
return ResponseEntity.ok(response);
8178
}
8279
}

0 commit comments

Comments
 (0)