-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from DDD-Community/feature/POLABO-108
feat(POLABO-128): 3차 mvp 개발
- Loading branch information
Showing
19 changed files
with
319 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
src/main/kotlin/com/ddd/sonnypolabobe/domain/board/my/controller/MyBoardV2Controller.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.ddd.sonnypolabobe.domain.board.my.controller | ||
|
||
import com.ddd.sonnypolabobe.domain.board.my.dto.MyBoardDto | ||
import com.ddd.sonnypolabobe.domain.board.my.service.MyBoardService | ||
import com.ddd.sonnypolabobe.domain.user.dto.UserDto | ||
import com.ddd.sonnypolabobe.global.entity.PageDto | ||
import com.ddd.sonnypolabobe.global.response.ApplicationResponse | ||
import io.swagger.v3.oas.annotations.Operation | ||
import io.swagger.v3.oas.annotations.tags.Tag | ||
import org.springframework.security.core.context.SecurityContextHolder | ||
import org.springframework.web.bind.annotation.* | ||
|
||
@Tag(name = "1.1.0") | ||
@RestController | ||
@RequestMapping("/api/v2/my/boards") | ||
class MyBoardV2Controller(private val myBoardService : MyBoardService) { | ||
|
||
@Operation(summary = "내 보드 목록 조회 - v2", description = """ | ||
내 보드 목록을 조회합니다. | ||
필터가 추가되었습니다. | ||
""") | ||
@GetMapping | ||
fun getMyBoards( | ||
@RequestParam(name = "page", defaultValue = "1") page : Int, | ||
@RequestParam size : Int, | ||
@RequestParam filter : Filter | ||
) : ApplicationResponse<PageDto<MyBoardDto.Companion.PageListRes>> { | ||
val user = SecurityContextHolder.getContext().authentication.principal as UserDto.Companion.Res | ||
return ApplicationResponse.ok(this.myBoardService.getMyBoards(user.id, page, size, filter)) | ||
} | ||
|
||
companion object { | ||
enum class Filter { | ||
OWNER, PARTICIPANT | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.