Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package Mua.Mua_backend.domain.notification.controller;

import Mua.Mua_backend.domain.member.entity.Member;
import Mua.Mua_backend.domain.notification.controller.docs.NotificationControllerDocs;
import Mua.Mua_backend.domain.notification.dto.response.NotificationResponse;
import Mua.Mua_backend.domain.notification.service.NotificationService;
import lombok.RequiredArgsConstructor;
Expand All @@ -13,7 +14,7 @@
@RestController
@RequiredArgsConstructor
@RequestMapping("/api/notifications")
public class NotificationController {
public class NotificationController implements NotificationControllerDocs {

private final NotificationService notificationService;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PatchMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

Expand Down Expand Up @@ -71,6 +73,31 @@ List<NotificationResponse> getMyNotifications(
);


@Operation(
summary = "알림 읽음 처리",
description = """
특정 알림을 읽음 상태로 변경합니다.

- 이미 읽은 알림이어도 요청은 정상 처리됩니다.
- 성공 시 200 OK를 반환합니다.
"""
)
@ApiResponses({
@ApiResponse(
responseCode = "200",
description = "알림 읽음 처리 성공"
)
})
@PatchMapping("/{notificationId}/read")
ResponseEntity<Void> readNotification(
@Parameter(description = "읽음 처리할 알림 ID", example = "1")
@PathVariable Long notificationId,

@Parameter(hidden = true)
@AuthenticationPrincipal Member member
);


@Operation(
summary = "내 알림 전체 삭제",
description = """
Expand Down
Loading