ju-front / green-light

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

ShowReceipt api 구현 #33

Open kjeok00 opened 3 weeks ago

kjeok00 commented 3 weeks ago

const ShowReceipt = (receiptID) =>

{
 /* 생성한 영수증 내역을 표시 */
}

request

{
 "receiptID": int(id_Key값)
}

response

{
 "receipt": {
   string(메뉴이름): {
    "quantity": int(개수),
    "price": int(금액)
    },
    string(메뉴이름): {
    "quantity": int(개수),
    "price": int(금액)
    }
   },
  "total_price": int(금액),
  "created_at": string(현재시간)
}
kjeok00 commented 1 week ago

Request

Method: GET
Endpoint: api/showReceipt
Parameters: None

Response

Content-Type: application/json

Body:

{
  "message": "Receipt data fetched successfully", (생략가능)
  "data": {
    "브루스케타": {
      "quantity": 1,
      "price": 6000
    },
    "카프레제 샐러드": {
      "quantity": 2,
      "price": 8000
    },
    "total_price": 26000
  }
}