채팅 타이틀(목록) 조회하기
REQUEST
Header
Headers { Authorization: "Bearer {token}" }
RequestParameter
- court | user | all
RESPONSE
Body
- Body 예시
{ "contents": [ { "id": 1, "court": { "id":1, "name":"잠실한강공원농구장", "latitude":127.082348760182, "longitude":37.5177740347208, "image":"https://team14-slam.s3.ap-northeast-2.amazonaws.com/court_dummy/court1.jpg", "basketCount":2, "texture":"ASPHALT" }, "lastChat": { "text": "마지막 메시지입니다" | "2021-01-01T12:20:10.000Z" "user": { "id": 1, } "createdAt": "2021-01-01T12:20:10.000Z", "updatedAt": "2021-01-01T12:20:10.000Z", } "createdAt": "2021-01-01T12:20:10.000Z", "updatedAt": "2021-01-01T12:20:10.000Z", }, { "courtName": "합정 농구장" "courtId": 2, "createdAt": "2021-01-01T12:20:10.000Z", "updatedAt": "2021-01-01T12:20:10.000Z" }, ], "lastId": 10 }
interface ChatRoom { id: number, type: "COURT" | "USERS" court?: Court, role?: { admin: User[], participant: User[], }, personLimit?: 100, lastChat: Chat, createdAt: "ISOstring", updatedAt: "ISOstring", } interface Chat { id: number, text: string, emoticons: { "😎": User[], "🤔": User[], }, loudSpeaker?: LoudSpeaker, text: string, creator: User, createdAt: "ISOstring", updatedAt: "ISOstring", } interface LoudSpeaker { id: number, startTime : string, createdAt: "ISOstring", updatedAt: "ISOstring", }
몽고 db 고려해볼 것