change wishlist toogle
This commit is contained in:
@@ -24,10 +24,10 @@ public class WishlistController {
|
|||||||
this.noticeService = noticeService;
|
this.noticeService = noticeService;
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/toggle")
|
@PostMapping("/toggle/{noticeId}")
|
||||||
public ResponseEntity<RequestResponseDTO> toggleWishlist(@RequestBody WishlistDTO wishlistDTO) {
|
public ResponseEntity<RequestResponseDTO> toggleWishlist(@PathVariable Long noticeId) {
|
||||||
Long noticeId = wishlistDTO.getNoticeId();
|
|
||||||
Long clientId = wishlistDTO.getClientId();
|
Long clientId = 1L;
|
||||||
NoticeDTO noticeDTO = noticeService.getNoticeById(noticeId);
|
NoticeDTO noticeDTO = noticeService.getNoticeById(noticeId);
|
||||||
if (noticeDTO == null) {
|
if (noticeDTO == null) {
|
||||||
return ResponseEntity.badRequest().body(new RequestResponseDTO("Notice not found"));
|
return ResponseEntity.badRequest().body(new RequestResponseDTO("Notice not found"));
|
||||||
|
|||||||
Reference in New Issue
Block a user