change wishlist toogle

This commit is contained in:
2025-05-29 23:17:54 +02:00
parent 6363f966f6
commit f4c8177270

View File

@@ -24,10 +24,10 @@ public class WishlistController {
this.noticeService = noticeService;
}
@PostMapping("/toggle")
public ResponseEntity<RequestResponseDTO> toggleWishlist(@RequestBody WishlistDTO wishlistDTO) {
Long noticeId = wishlistDTO.getNoticeId();
Long clientId = wishlistDTO.getClientId();
@PostMapping("/toggle/{noticeId}")
public ResponseEntity<RequestResponseDTO> toggleWishlist(@PathVariable Long noticeId) {
Long clientId = 1L;
NoticeDTO noticeDTO = noticeService.getNoticeById(noticeId);
if (noticeDTO == null) {
return ResponseEntity.badRequest().body(new RequestResponseDTO("Notice not found"));