Skip to content

Commit

Permalink
feat: #52 앨범 페이지 복구 컨트롤러 메서드 작성
Browse files Browse the repository at this point in the history
  • Loading branch information
Choi-Jungbin committed Oct 21, 2023
1 parent 198a75d commit 24f4af5
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/main/java/com/example/team2_be/trash/TrashController.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -26,4 +23,10 @@ public ResponseEntity<ApiUtils.ApiResult<TrashesFindResponseDTO>> findTrashes (@
return ResponseEntity.ok(ApiUtils.success(findDTO));
}

@PostMapping("/{trashId}")
public ResponseEntity<ApiUtils.ApiResult<Void>> restoreTrash(@PathVariable String albumId, @PathVariable Long trashId){
trashService.restoreTrash(trashId);

return ResponseEntity.ok(ApiUtils.success(null));
}
}

0 comments on commit 24f4af5

Please sign in to comment.