HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
프로그래머스 프론트엔드 데브코스 2기
프로그래머스 프론트엔드 데브코스 2기
/
❤️‍🔥
화랑팀
/
🥀
화면 기획 및 API 기획
/
💡
알림
💡

알림

 

1. 나의 알림 목록[GET]

🌷
/notifications
Request
{ header: { Authorization: 'baerer JWT token' } }
Response
[ // Notification Array { "seen": Boolean, "_id": String, "author": User, "user": User | String, "post": Nullable<String>, // 포스트 id "follow": Optional<String>, // 사용자 id "comment": Optional<Comment>, "message": Optional<String>, // 메시지 id "createdAt": String, "updatedAt": String, // notificationType 어디갔지? } ]
 

2. 알림 읽음 처리[GET]

🌷
/notifications/seen
Request
{ header: { Authorization: 'baerer JWT token' } }
Response
 

3. 알림 생성[POST]

🌷
/notifications/create
Request
{ header: { Authorization: 'baerer JWT token' }, body: { notificationType: "COMMENT"|"FOLLOW"|"LIKE"|"MESSAGE", notificationTypeId: String -> 조건 { COMMENT일 경우: 댓글 id, FOLLOW일 경우: 팔로우 id, LIKE일 경우: 좋아요 id, MESSAGE일 경우: 메세지 id }, userId: String, postId: Nullable<String> // type이 FOLLOW인 경우에는 Null } }
Response
{ // Notification Object "seen": Boolean, "_id": String, "author": User, "user": User | String, "post": Nullable<String>, // 포스트 id "follow": Optional<String>, // 사용자 id "comment": Optional<Comment>, "message": Optional<String>, // 메시지 id "createdAt": String, "updatedAt": String, // notificationType 어디갔지? }