Skip to content

Commit

Permalink
[#140] refactor: import asterisk(*) 삭제, 메서드명 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
JuHyun419 committed Aug 29, 2022
1 parent 106639d commit 9de051e
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ import io.swagger.annotations.ApiOperation
import io.swagger.annotations.ApiParam
import org.springframework.http.HttpStatus
import org.springframework.http.ResponseEntity
import org.springframework.web.bind.annotation.*
import org.springframework.web.bind.annotation.PatchMapping
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.RequestBody
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

@RestController
@RequestMapping("/api/v1/trash")
Expand All @@ -19,14 +23,14 @@ class TrashController(
@ApiOperation("북마크 복원 API")
@PatchMapping("/restore")
fun restoreBookmarks(@RequestBody @ApiParam(value = "복원할 북마크 ID 리스트", required = true) request: BookmarkDto.RestoreBookmarkRequest): ResponseEntity<String> {
bookmarkService.restore(request.bookmarkIdList)
bookmarkService.restoreBookmarks(request.bookmarkIdList)
return ResponseEntity.status(HttpStatus.OK).body(Message.SUCCESS)
}

@ApiOperation("북마크 영구삭제 API")
@PostMapping("/truncate")
fun permanentDelete(@RequestBody @ApiParam(value = "영구삭제할 북마크 ID 리스트", required = true) request: BookmarkDto.TruncateBookmarkRequest): ResponseEntity<String> {
bookmarkService.permanentDelete(request.bookmarkIdList)
bookmarkService.deleteBookmarkPermanently(request.bookmarkIdList)
return ResponseEntity.status(HttpStatus.OK).body(Message.SUCCESS)
}
}

0 comments on commit 9de051e

Please sign in to comment.