공지사항

공지 목록조회와 단일 정보 조회는 role에 따라 보여지는 공지가 다르다. 관리자가 Target을 선택할 수 있는데, ENTIRE는 사장님,사용자 모두 조회가능, OWNER는 사장님만 조회가능, USER 사용자만 조화가능 하다. 관리자는 모든 글 조회가 가능하며, 공지 등록, 수정과 삭제는 관리자만 가능하다.

공지 목록 조회

GET /api/notice

현재 사용자의 권한에 따라 보이는 목록이 다르다.

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Response Body

[
  {
    "noticeId": 1,
    "noticeTitle": "공지 제목 1"
    "createdDate": "2024-11-14T12:00:00",
    "target":"ENTIRE",
    "viewCont":0
  },
  {
    "noticeId": 2,
    "noticeTitle: "공지 제목 2",
    "createdDate": "2024-11-13T09:30:00",
     "target":"USER",
     "viewCont":0
  }
]

공지 단일 조회

GET /api/notice/id/{noticeId}

{noticeId}: 수정할 공지사항의 고유 ID

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Response Body


공지 등록(관리자)

POST /api/notice/admin

<Description of the endpoint>

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Description

name

string

Name of the user

age

number

Age of the user

Request Body

Response Body


공지 수정(관리자)

PUT /api/notices/admin/{noticeId}

{noticeId}: 수정할 공지사항의 고유 ID

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Description

string

공지제목

string

공지내용

NoticeTarget(String)

대상(ENTIRE/OWNER/USER)

Response Bosy


공지 삭제(관리자)

DELETE /api/notices/admin/{noticeId}

{noticeId}: 삭제할 공지사항의 고유 ID

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Response Body

Last updated