Skip to content

Commit 92ebbfa

Browse files
committed
fix admin project controller
add 유져별 project list 조회 api
1 parent 14d4458 commit 92ebbfa

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/main/java/NextLevel/demo/admin/project/AdminProjectController.java

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,22 @@
33
import NextLevel.demo.common.SuccessResponse;
44
import NextLevel.demo.project.ProjectStatus;
55
import NextLevel.demo.project.project.service.ProjectDeleteService;
6+
import NextLevel.demo.project.project.service.ProjectService;
7+
import NextLevel.demo.user.dto.user.request.RequestMyPageProjectListDto;
8+
import NextLevel.demo.user.service.MypageProjectSelectService;
9+
import NextLevel.demo.user.service.UserService;
10+
import NextLevel.demo.user.service.UserValidateService;
611
import NextLevel.demo.util.jwt.JWTUtil;
712
import com.fasterxml.jackson.annotation.JsonCreator;
13+
import jakarta.validation.Valid;
814
import lombok.RequiredArgsConstructor;
15+
import org.springframework.http.HttpStatus;
916
import org.springframework.http.ResponseEntity;
1017
import org.springframework.stereotype.Controller;
1118
import org.springframework.web.bind.annotation.DeleteMapping;
1219
import org.springframework.web.bind.annotation.PathVariable;
1320
import org.springframework.web.bind.annotation.PostMapping;
21+
import org.springframework.web.bind.annotation.RequestBody;
1422
import org.springframework.web.bind.annotation.RequestMapping;
1523
import org.springframework.web.bind.annotation.RequestParam;
1624

@@ -21,9 +29,13 @@ public class AdminProjectController {
2129

2230
private final ProjectDeleteService projectDeleteService;
2331
private final AdminProjectService adminProjectService;
32+
private final MypageProjectSelectService mypageProjectListService;
33+
private final UserValidateService userValidateService;
2434

25-
public ResponseEntity getProjectList() {
26-
return null;
35+
@PostMapping
36+
public ResponseEntity<?> mypageProjectListSupporter(@RequestBody @Valid RequestMyPageProjectListDto dto) {
37+
userValidateService.findUserWithUserId(dto.getUserId());
38+
return ResponseEntity.status(HttpStatus.OK).body(new SuccessResponse("success", mypageProjectListService.mypageProjectList(dto)));
2739
}
2840

2941
@PostMapping("/status/{projectId}")

0 commit comments

Comments
 (0)