Skip to content

구현 : chats

오주환 edited this page Jul 29, 2022 · 1 revision

chats에 대한 상세 구현 문서입니다.

기능 목록

  1. 채팅방 생성
  2. 채팅방 수정
  3. 채팅방 전체 조회





채팅방 생성

URL

POST http://localhost:3000/api/chats

Request

{
    "title" : "모여라 채팅방"
}

Response

{
    "status": 201,
    "isSuccess": true,
    "message": "성공",
}





채팅방 수정

URL

PATCH http://localhost:3000/api/chats/1

Request

{
    "title" : "모여라 채팅방2"
}

Response

{
    "status": 200,
    "isSuccess": true,
    "message": "성공"
}




채팅방 전체 조회

URL

GET http://localhost:3000/api/chats

Response

{
    "status": 200,
    "isSuccess": true,
    "message": "성공",
    "data": [
        {
            "id": 1,
            "title": "모여라 채팅방2",
            "createdAt": "2022-07-27T16:16:32.419Z",
            "participants": 2
        },
        {
            "id": 3,
            "title": "개발팀 채팅방",
            "createdAt": "2022-07-30T13:16:32.419Z",
            "participants": 5
        },
    ]
}