Skip to content

Commit a4769d5

Browse files
committed
[EA3-143] feature: 회원과 PR 템플릿에 대한 추가 엔드포인트 요청으로 추가
1 parent aa6b702 commit a4769d5

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/main/java/grep/neogul_coder/domain/prtemplate/controller/PrTemplateController.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ public ApiResponse<PrPageResponse> get(@AuthenticationPrincipal Principal princi
3333
return ApiResponse.success(prPageResponse);
3434
}
3535

36+
@GetMapping("/{userid}")
37+
public ApiResponse<PrPageResponse> get(@PathVariable("userid") Long userId) {
38+
PrPageResponse prPageResponse = prTemplateService.toResponse(userId);
39+
return ApiResponse.success(prPageResponse);
40+
}
41+
3642
@PutMapping("/update/template")
3743
public ApiResponse<Void> update(@AuthenticationPrincipal Principal principal,
3844
@RequestBody PrUpdateRequest request) {

src/main/java/grep/neogul_coder/domain/users/controller/UserController.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ public ApiResponse<UserResponse> get(@AuthenticationPrincipal Principal principa
3737
return ApiResponse.success(userResponse);
3838
}
3939

40+
@GetMapping("/{userid}")
41+
public ApiResponse<UserResponse> get(@PathVariable("userid") Long userId) {
42+
UserResponse userResponse = usersService.getUserResponse(userId);
43+
return ApiResponse.success(userResponse);
44+
}
45+
4046
@PutMapping("/update/profile")
4147
public ApiResponse<Void> updateProfile(@AuthenticationPrincipal Principal principal,
4248
@RequestBody UpdateProfileRequest request) {

0 commit comments

Comments
 (0)