콘텐츠로 이동

hide_notifications (알림 숨김 처리)

알림 ID 리스트를 받아 일괄 숨김 처리합니다.

기본 정보

항목
URL https://asia-northeast3-construction24-test.cloudfunctions.net/hide_notifications
Method POST
인증 Firebase ID Token 필요

요청

Body

필드 타입 필수 설명 검증
notification_ids array O 숨김 처리할 알림 ID 리스트 -

요청 예시

{
  "notification_ids": ["notif_id_1", "notif_id_2", "notif_id_3"]
}

응답

성공 (200)

{
  "message": "알림 숨김 처리 완료",
  "fail_list": []
}

실패 항목이 있는 경우

{
  "message": "알림 숨김 처리 완료",
  "fail_list": [
    {
      "notification_id": "notif_id_3",
      "error": "존재하지 않는 알림입니다."
    }
  ]
}

실패

코드 message 원인
403 인증 오류 토큰 없음/만료
500 서버 오류 내부 오류

참고

  • 알림 데이터는 users/{UID}/notifications 컬렉션에 저장됩니다.
  • 이미 숨긴 알림(hidden: true)은 스킵됩니다.
  • 숨김 처리 시 hidden: true, hidden_at (서버 타임스탬프)이 기록됩니다.
  • 클라이언트에서 알림 목록 조회 시 hidden == false로 필터링하여 숨긴 알림을 제외할 수 있습니다.
  • 관련 API: read_notifications