ju-front / green-light

G-Order Tabling System
https://ju-front.github.io/green-light
1 stars 1 forks source link

SignIn api 구현 #27

Open kjeok00 opened 3 weeks ago

kjeok00 commented 3 weeks ago

const SignIn = (userID) =>

{
 /* 사용자 로그인을 하고, 사용자의 알러지 현황을 갱신합니다. */
}

request

{
 "userID": string
}

response

{
 "gluten": bool,
 "dairy": bool,
 "egg": bool,
 "shellfish": bool,
 "nut": bool,
 "soy": bool,
 "fish": bool,
 "celery": bool,
 "mustard": bool
}
kjeok00 commented 3 weeks ago

front -> back:

string "userID"

back -> front:

{
  "message": "Signed in successfully",
  "user": {
    "userID": "abc123",
    "gluten": true,
    "dairy": false,
    "egg": true,
    "shellfish": false,
    "nut": true,
    "soy": false,
    "fish": true,
    "celery": false,
    "mustard": true
  }
}
ambition-kwon commented 3 weeks ago

Front->Back 의 경우 보통 Request라고 표현하고 Back->Front의 경우 보통 Response라고 명시하면 좋습니다~ @kjeok00

21divcert commented 3 weeks ago

더하여 경로 Request : api/{메서드명} (param), Response : {데이터 자료형 ex) json, int, string...} 이렇게 명시해주시면 좋을 듯 합니다. 고생하셨습니다.