profileComponent
관련된 API 경로를 /profile
에서 /user
로 변경. /profile
에 너무 많은 endpoint 가 존재하기 때문에 분리하기로 결정.PATCH /profile
으로 유저의 이미지와 닉네임을 모두 가져왔는데, PATCH /profile/nickname
, PATCH /profile/image
로 분리.PUT /dm/{:userId}
에서 DM 을 위한 별도의 router 가 필요하지 않다고 판단하여 PUT /user/{:userId}/dm
으로 변경/chats
와 /channel-room
으로 분리했었는데, 채팅룸 안에서의 API 는 :channelId
param 으로 구분할 수 있기 때문에, 이를 /chats
로 통합했다.GET /user/{:userId}/info
⇒ 200Description: profileComponent 에서 profileImage 와 nickname 을 GET
Res Body
{
"profileImage" : "localhost:3000/path/to/image",
"nickname" : "yongjule"
}
PUT /user/{:userId}/block
⇒ 200 || 201{:userId}
로 특정되는 유저를 차단할 때 보내는 요청. blocked_users 테이블에 row 가 생성된다.DELETE /user/{:userId}/block
⇒ 200{:userId}
로 특정되는 유저를 차단 해제할 때 보내는 요청. blocked_users 테이블에서 row 가 삭제된다.PUT /user/{:userId}/friend
⇒ 200 || 201{:userId}
로 특정되는 유저를 친구 리스트에 추가. friends 테이블에서 자신과 해당 친구의 관계가 생성된다.DELETE /user/{:userId}/friend
⇒ 200{:userId}
로 특정되는 유저를 내 친구 리스트에서 삭제. friends 테이블에서 자신과 해당 친구의 관계가 없어진다.PUT /user/{:userId}/dm
⇒ 201 || 304 (with Content-Location
)