diff --git a/src/main/java/com/example/team2_be/trash/TrashController.java b/src/main/java/com/example/team2_be/trash/TrashController.java index 1fb2261e..6cd2ca3d 100644 --- a/src/main/java/com/example/team2_be/trash/TrashController.java +++ b/src/main/java/com/example/team2_be/trash/TrashController.java @@ -6,10 +6,7 @@ import lombok.RequiredArgsConstructor; import org.springframework.http.ResponseEntity; import org.springframework.security.core.annotation.AuthenticationPrincipal; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; @RestController @RequiredArgsConstructor @@ -26,4 +23,10 @@ public ResponseEntity> findTrashes (@ return ResponseEntity.ok(ApiUtils.success(findDTO)); } + @PostMapping("/{trashId}") + public ResponseEntity> restoreTrash(@PathVariable String albumId, @PathVariable Long trashId){ + trashService.restoreTrash(trashId); + + return ResponseEntity.ok(ApiUtils.success(null)); + } }