sample - SOPT26th-iOS-DesignSeminar/Server GitHub Wiki

둜그인

λ©”μ†Œλ“œ 경둜 μ„€λͺ…
POST /user/signin 둜그인

γ…€

Request Header

{
    "Content-Type": "application/json"
}

γ…€

Request Body

{
  "id": "aaa",
  "password": "sopt"
}
  • id : μ‚¬μš©μž 아이디
  • password : μ‚¬μš©μž λΉ„λ°€λ²ˆν˜Έ

γ…€

Response

< Success >

{
    "status": 200,
    "success": true,
    "message": "둜그인 성곡",
    "data": {       
 "jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZHgiOjEsIm5hbWUiOiJnbmdzbiIsImlhdCI6MTU4ODU5NjEwOH0.ZvAXsth9RgtwvJRXdjuO3XC6A7uyeFNefhNxi2ok6R4"
    }
}

γ…€

< Fail >

  • λΉ„λ°€λ²ˆν˜Έ 였λ₯˜
{
    "status": 400,
    "success": false,
    "message": "λΉ„λ°€λ²ˆν˜Έκ°€ μΌμΉ˜ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€"
}
  • μ‘΄μž¬ν•˜μ§€ μ•ŠλŠ” 아이디
{
    "status": 200,
    "success": false,
    "message": "μ‘΄μž¬ν•˜μ§€ μ•ŠλŠ” μœ μ € μž…λ‹ˆλ‹€."
}
  • 데이터 λˆ„λ½
{
    "status": 400,
    "success": false,
    "message": "ν•„μš”ν•œ 값이 μ—†μŠ΅λ‹ˆλ‹€. password"
}

γ…€

γ…€

νšŒμ›κ°€μž…

γ…€

λ©”μ†Œλ“œ 경둜 μ„€λͺ…
POST /user/signup νšŒμ›κ°€μž…

γ…€

Request Header

{
    "Content-Type": "application/json"
}

γ…€

Request Body

{
  "id": "aaa",
  "password": "sopt",
  "name": "sopt26",
  "email": "[email protected]",
  "phone": "000-0000-0000",
  "address": "μ„œμšΈμ‹œ 성뢁ꡬ 보문둜"
}
  • id : μ‚¬μš©μž 아이디
  • password : μ‚¬μš©μž λΉ„λ°€λ²ˆν˜Έ
  • name : μ‚¬μš©μž 이름
  • email : μ‚¬μš©μž 이메일
  • phone : μ‚¬μš©μž ν•Έλ“œν° 번호
  • address: μ‚¬μš©μž μ£Όμ†Œ

γ…€

Response

< Success >

{
    "status": 204,
    "success": true,
    "message": "νšŒμ›κ°€μž… 성곡"
}

γ…€

< Fail >

  • 아이디 쀑볡
{
    "status": 200,
    "success": false,
    "message": "μ‘΄μž¬ν•˜λŠ” ID μž…λ‹ˆλ‹€."
}
  • 데이터 λˆ„λ½
{
    "status": 400,
    "success": false,
    "message": "ν•„μš”ν•œ 값이 μ—†μŠ΅λ‹ˆλ‹€. address"
}

γ…€

γ…€

⚠️ **GitHub.com Fallback** ⚠️