<aside> 💡 유저별 알림 조회
HTTP 메소드: GET
URI: /notifications
요청 헤더: Authorization: Bearer 액세스토큰
요청 쿼리 파라미터:
page: IntpageSize: Int응답 데이터
{
"code": 200,
"message": "조회가 완료되었습니다.",
"data": [
{
"_id": "6681228befff33d0b09cd228",
"userId": "jj0745",
"title": "새로운 메시지가 도착했습니다",
"body": "hello",
"type": "CHAT_MESSAGE",
"contentAvailable": true,
"priority": "high",
"data": {
"chatroomId": "668116d60391fc6305706d53"
},
"createdAt": "2024-06-30T09:16:59.596Z",
"updatedAt": "2024-06-30T09:16:59.599Z"
},
{
"_id": "6681228befff33d0b09cd229",
"userId": "jj0745",
"title": "새로운 메시지가 도착했습니다",
"body": "hello",
"type": "CHAT_MESSAGE",
"contentAvailable": true,
"priority": "high",
"data": {
"chatroomId": "668116d60391fc6305706d53"
},
"createdAt": "2024-06-30T09:16:59.596Z",
"updatedAt": "2024-06-30T09:16:59.599Z"
}
],
"meta": {
"page": 1,
"pageSize": 2,
"total": 325,
"pageCount": 163,
"hasPreviousPage": false,
"hasNextPage": true
}
}
응답 데이터: { errorCode: "1010", message: "Access token expired." }
</aside>
<aside> 💡 읽지 않은 알림 개수 조회
HTTP 메소드: GET
URI: /notifications/unread-count
요청 헤더: Authorization: Bearer 액세스토큰
응답 데이터
{
"code": 200,
"message": "조회가 완료되었습니다.",
"data": 0
}
응답 데이터: { errorCode: "1010", message: "Access token expired." }
</aside>
<aside> 💡 전체 공지 날리기
HTTP 메소드: POST
URI: /notifications/global
요청 헤더: Authorization: Bearer 액세스토큰
요청 바디:
{
"title": "공지",
"body": "테스트 공지입니다.",
"contentAvailable": true, // nullable
"priority": "high", // nullable
"data": { // nullable
"extra": "추가로 넣을 데이터, 필드명도 변경 가능"
}
}
응답 데이터
{
"code": 200,
"message": "전체 공지 전송이 완료되었습니다."
}
응답 데이터: { errorCode: "1010", message: "Access token expired." }
</aside>