-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/#132 공유 #162
Merged
The head ref may contain hidden characters: "feature/#132-\uACF5\uC720"
+506
−750
Merged
Feature/#132 공유 #162
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
c33b963
[#132] refactor(Bookmark): Bookmark 엔티티 수정
Ji-Ha 6b573d7
[#132] refactor(Bookmark): remindOff 메소드 하나 추가
Ji-Ha 9de8c34
[#132] refactor(Bookmark)
Ji-Ha 374c699
[#132] refactor(Bookmark)
Ji-Ha 0b2beb8
[#132] test(Bookmark)
Ji-Ha 762f14d
[#132] test(mongoDB) : list 내부 조회 쿼리 테스트 진행
Ji-Ha b7226d6
[#132] feature(bookmark)
Ji-Ha 7271868
[#132] refactor(bookmark)
Ji-Ha 5544b9c
[#132] refactor(bookmark page)
Ji-Ha d43618d
[#132] refactor(open 북마크)
Ji-Ha cced585
[#132] refactor(folder info 조회)
Ji-Ha 335e701
Merge branch 'develop' into feature/#132-공유
Ji-Ha File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package com.yapp.web2.domain.bookmark.controller | ||
|
||
import com.yapp.web2.domain.bookmark.entity.Bookmark | ||
import com.yapp.web2.domain.bookmark.BookmarkDto | ||
import com.yapp.web2.domain.bookmark.service.BookmarkService | ||
import com.yapp.web2.util.ControllerUtil | ||
import com.yapp.web2.util.Message | ||
|
@@ -27,7 +27,7 @@ class BookmarkController( | |
fun createBookmark( | ||
request: HttpServletRequest, | ||
@PathVariable @ApiParam(value = "북마크를 지정할 폴더 ID", example = "12", required = true) folderId: Long, | ||
@RequestBody @ApiParam(value = "북마크 생성 정보", required = true) bookmark: Bookmark.AddBookmarkDto | ||
@RequestBody @ApiParam(value = "북마크 생성 정보", required = true) bookmark: BookmarkDto.AddBookmarkDto | ||
): ResponseEntity<String> { | ||
val token = ControllerUtil.extractAccessToken(request) | ||
bookmarkService.addBookmark(token, folderId, bookmark) | ||
|
@@ -39,16 +39,29 @@ class BookmarkController( | |
fun createBookmark( | ||
request: HttpServletRequest, | ||
@RequestParam @ApiParam(value = "북마크를 지정할 폴더 ID", example = "12", required = true) folderId: Long?, | ||
@RequestBody @ApiParam(value = "북마크 생성 정보", required = true) bookmark: Bookmark.AddBookmarkDto | ||
@RequestBody @ApiParam(value = "북마크 생성 정보", required = true) bookmark: BookmarkDto.AddBookmarkDto | ||
): ResponseEntity<String> { | ||
val token = ControllerUtil.extractAccessToken(request) | ||
bookmarkService.addBookmark(token, folderId, bookmark) | ||
return ResponseEntity.status(HttpStatus.OK).body(Message.SAVED) | ||
} | ||
|
||
@ApiOperation(value = "여러개의 북마크 생성 API") | ||
@PostMapping("/list") | ||
fun createBookmarkList( | ||
request: HttpServletRequest, | ||
@RequestParam(required = false) @ApiParam(value = "북마크가 저장될 폴더 ID", example = "12") folderId: Long?, | ||
@ApiParam(value = "북마크 생성 리스트 정보") @RequestBody dto: BookmarkDto.AddBookmarkListDto | ||
): ResponseEntity<String> { | ||
println(folderId) | ||
val token = ControllerUtil.extractAccessToken(request) | ||
bookmarkService.addBookmarkList(token, folderId, dto) | ||
return ResponseEntity.status(HttpStatus.OK).body(Message.SAVED) | ||
} | ||
|
||
@ApiOperation(value = "북마크 삭제 API") | ||
@PostMapping("/delete") | ||
fun deleteBookmark(@RequestBody bookmarkList: Bookmark.BookmarkIdList): ResponseEntity<String> { | ||
fun deleteBookmark(@RequestBody bookmarkList: BookmarkDto.BookmarkIdList): ResponseEntity<String> { | ||
bookmarkService.deleteBookmark(bookmarkList) | ||
return ResponseEntity.status(HttpStatus.OK).body(Message.DELETED) | ||
} | ||
|
@@ -57,15 +70,16 @@ class BookmarkController( | |
@PatchMapping("/{bookmarkId}") | ||
fun updateBookmark( | ||
@PathVariable @ApiParam(value = "북마크 ID", example = "10", required = true) bookmarkId: String, | ||
@RequestBody @Valid @ApiParam(value = "북마크 수정 정보", required = true) dto: Bookmark.UpdateBookmarkDto | ||
@RequestBody @Valid @ApiParam(value = "북마크 수정 정보", required = true) dto: BookmarkDto.UpdateBookmarkDto | ||
): ResponseEntity<String> { | ||
bookmarkService.updateBookmark(bookmarkId, dto) | ||
return ResponseEntity.status(HttpStatus.OK).body(Message.UPDATED) | ||
} | ||
|
||
@ApiOperation(value = "여러 북마크 이동 API") | ||
@PostMapping("/moveList") | ||
fun moveBookmarkList( | ||
@RequestBody moveBookmarkDto: Bookmark.MoveBookmarkDto | ||
@RequestBody @ApiParam(value = "북마크 이동 정보", required = true) moveBookmarkDto: BookmarkDto.MoveBookmarkDto | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
): ResponseEntity<String> { | ||
bookmarkService.moveBookmarkList(moveBookmarkDto) | ||
return ResponseEntity.status(HttpStatus.OK).body(Message.UPDATED) | ||
|
@@ -76,20 +90,20 @@ class BookmarkController( | |
@PatchMapping("/move/{bookmarkId}") | ||
fun moveBookmark( | ||
@PathVariable @ApiParam(value = "북마크 ID", example = "10", required = true) bookmarkId: String, | ||
@RequestBody @ApiParam(value = "북마크 이동 정보", required = true) bookmark: Bookmark.MoveBookmarkDto | ||
@RequestBody @ApiParam(value = "북마크 이동 정보", required = true) dto: BookmarkDto.MoveBookmarkDto | ||
): ResponseEntity<String> { | ||
bookmarkService.moveBookmark(bookmarkId, bookmark) | ||
bookmarkService.moveBookmarkList(dto) | ||
return ResponseEntity.status(HttpStatus.OK).body(Message.MOVED) | ||
} | ||
|
||
@PostMapping("/remind/{bookmarkId}") | ||
@GetMapping("/remindOn/{bookmarkId}") | ||
fun toggleOnRemindBookmark(request: HttpServletRequest, @PathVariable bookmarkId: String): ResponseEntity<String> { | ||
val token = ControllerUtil.extractAccessToken(request) | ||
bookmarkService.toggleOnRemindBookmark(token, bookmarkId) | ||
return ResponseEntity.status(HttpStatus.OK).body(Message.UPDATED) | ||
} | ||
|
||
@DeleteMapping("/remind/{bookmarkId}") | ||
@GetMapping("/remindOff/{bookmarkId}") | ||
fun toggleOffRemindBookmark(request: HttpServletRequest, @PathVariable bookmarkId: String): ResponseEntity<String> { | ||
val token = ControllerUtil.extractAccessToken(request) | ||
bookmarkService.toggleOffRemindBookmark(token, bookmarkId) | ||
|
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요건 제거해도 될 것 같아요 ㅋㅋ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵넵!