Skip to content

사용자 알람 내역 조회

ktyu edited this page Jan 10, 2019 · 2 revisions

사용자 알람 내역 조회

메소드 경로 설명
GET /users/notification 사용자 알람 내역 조회

QueryString 설명

parameter 설명 예시

요청 헤더

Authorization: 토큰

요청바디



응답 바디

조회 성공 (최신순 정렬, 조회 성공후 사용자의 모든 checked 값이 True로 바뀜)

  • alertType의 종류 (향후 추가될 수 있음)
    • NewNotice => 새로운 맞춤지원 공고가 등록됨
    • ThreeDaysLeft => 스크랩해둔 공고가 3일 남음
{
    "status": 200,
    "message": "사용자의 알람 조회 성공",
    "data": [
        {
            "noticeIdx": 59,
            "alertType": "ThreeDaysLeft",
            "message": "지원사업제목",
            "checked": false,
            "outputTime": "56분 전"
        },
        {
            "noticeIdx": 45,
            "alertType": "NewNotice",
            "message": "지원사업제목이와요",
            "checked": true,
            "outputTime": "19시간 전"
        },
        {
            "noticeIdx": 101,
            "alertType": "NewNotice",
            "message": "2019년 소상공인 돈주는 지원사업",
            "checked": true,
            "outputTime": "01/02 01:49"
        }
    ]
}

조회 실패 (저장된 사용자의 알람이 1건도 없음)

{
    "status": 204,
    "message": "사용자의 알람이 존재하지 않습니다.",
    "data": null
}

헤더에 토큰이 아예 없는 경우

{
    "status": 401,
    "message": "인증 실패: 토큰 없음",
    "data": null
}

토큰이 유효하지 않은 경우 (헤더의 Authorization 키가 존재하지만 토큰 디코딩에 실패)

{
    "status": 403,
    "message": "인가 실패: 유효하지 않은 토큰",
    "data": null
}

서버 내부 에러

{
    "status": 500,
    "message": "서버 내부 에러",
    "data": null
}

데이터베이스 에러

{
    "status": 600,
    "message": "데이터베이스 에러",
    "data": null
}
Clone this wiki locally