Package inha.git.team.api.controller
Class TeamPostController
java.lang.Object
inha.git.team.api.controller.TeamPostController
@RestController
@RequestMapping("/api/v1/teams/posts")
public class TeamPostController
extends Object
TeamPostController는 Team Post 관련 엔드포인트를 처리.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateTeamPost
(User user, CreateTeamPostRequest createTeamPostRequest) 팀 게시글 생성 APIdeleteTeamPost
(User user, Integer postIdx) 팀 게시글 삭제 APIgetTeamPost
(Integer postIdx) 팀 게시글 상세 조회 APIBaseResponse<org.springframework.data.domain.Page<SearchTeamPostsResponse>>
getTeamPosts
(Integer page) 팀 게시글 전체 조회 APIupdateTeamPost
(User user, Integer postIdx, UpdateTeamPostRequest updateTeamPostRequest) 팀 게시글 수정 API
-
Constructor Details
-
TeamPostController
public TeamPostController()
-
-
Method Details
-
getTeamPosts
@GetMapping public BaseResponse<org.springframework.data.domain.Page<SearchTeamPostsResponse>> getTeamPosts(@RequestParam("page") Integer page) 팀 게시글 전체 조회 API팀 게시글 전체를 조회한다.
- Parameters:
page
- Integer- Returns:
- 검색된 팀 게시글 정보를 포함하는 BaseResponse<Page
>
-
getTeamPost
@GetMapping("/{postIdx}") public BaseResponse<SearchTeamPostResponse> getTeamPost(@PathVariable("postIdx") Integer postIdx) 팀 게시글 상세 조회 API팀 게시글 상세를 조회한다.
- Parameters:
postIdx
- Integer- Returns:
- 검색된 팀 게시글 정보를 포함하는 BaseResponse
-
createTeamPost
@PostMapping public BaseResponse<TeamPostResponse> createTeamPost(@AuthenticationPrincipal User user, @Validated @RequestBody CreateTeamPostRequest createTeamPostRequest) 팀 게시글 생성 API- Parameters:
user
- UsercreateTeamPostRequest
- CreateTeamPostRequest- Returns:
- BaseResponse
-
updateTeamPost
@PutMapping("/{postIdx}") public BaseResponse<TeamPostResponse> updateTeamPost(@AuthenticationPrincipal User user, @PathVariable("postIdx") Integer postIdx, @Validated @RequestBody UpdateTeamPostRequest updateTeamPostRequest) 팀 게시글 수정 API- Parameters:
user
- UserpostIdx
- IntegerupdateTeamPostRequest
- UpdateTeamPostRequest- Returns:
- BaseResponse
-
deleteTeamPost
@DeleteMapping("/{postIdx}") public BaseResponse<TeamPostResponse> deleteTeamPost(@AuthenticationPrincipal User user, @PathVariable("postIdx") Integer postIdx) 팀 게시글 삭제 API- Parameters:
user
- UserpostIdx
- Integer- Returns:
- BaseResponse
-