Skip to content
Leeyoujin edited this page Feb 21, 2021 · 4 revisions

User

user profile 확인 및 수정

Profile 정보 받기

[req] GET /user/:user_id (ex : /user/3)
header : {
     authorization: token(string)
}
[res]
status code : 200
{
  "msg": "user profile",
  "info": {
    "email": "[email protected]",
    "name": "test",
    "birth": "2021-02-10T15:00:00.000Z",
    "death": "2021-03-04T15:00:00.000Z",
    "profile_image": "http://localhost:3001/upload/2021-02-21/20210221114000_스크린샷(1).png",
    "profile_detail": "test"
  }
}
status code : 400
{
        'msg':`Invalid user id`
}

Profile update(자신의 profile일때만 수정가능)

[req] PUT /user/update
header : {
     authorization: token(string)
}
body : {
     name : (string)
     birth : (date)
     death : (date)
     profile_image : (file) // 나중에 구현
     profile_detail : (string)
}
[res] 
status code : 200
{ 
     msg : 'profile update success'
}
status code : 400
{
        'msg':`Invalid user id`
}

User id 받기

[req] GET /user/getid
header : {
     authorization: token(string)
}
[res]
status code : 200
{
  "user_id" : user_id(int)
}
status code : 400
{
        'msg':`Invalid user token`
}
Clone this wiki locally