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 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 - User
      createTeamPostRequest - CreateTeamPostRequest
      Returns:
      BaseResponse
    • updateTeamPost

      @PutMapping("/{postIdx}") public BaseResponse<TeamPostResponse> updateTeamPost(@AuthenticationPrincipal User user, @PathVariable("postIdx") Integer postIdx, @Validated @RequestBody UpdateTeamPostRequest updateTeamPostRequest)
      팀 게시글 수정 API
      Parameters:
      user - User
      postIdx - Integer
      updateTeamPostRequest - UpdateTeamPostRequest
      Returns:
      BaseResponse
    • deleteTeamPost

      @DeleteMapping("/{postIdx}") public BaseResponse<TeamPostResponse> deleteTeamPost(@AuthenticationPrincipal User user, @PathVariable("postIdx") Integer postIdx)
      팀 게시글 삭제 API
      Parameters:
      user - User
      postIdx - Integer
      Returns:
      BaseResponse