본문 바로가기

내일 배움 캠프/kiosk

kiosk 6일차 8/1 주문 관리 (2)

728x90

주문관리 (2)에 본격적으로 들어가기에 앞서서 지금까지 신경쓰지 않았던 예외 처리를 하였다. 

 

 

예외처리

 

fix : totalprice, exception handling

 

  • totalprice

receipt.controller.js:9 : show totalprice

 

  • exception handling 

order_item.repository.js:7 : findid and return 400 when !findid

items.service.js : 100 : findid and return 400 when !findid

messages.js 24 : nobuy added

order_item.service.js : 15 : findid and return 400 when !findid

receipts.serice.js : 23 finditem, amount, option exception handling

 

  • refactoring

items.repository.js :4 findOne >  findbyPK

receipts.repository.js : 21 findprice > finditem

 

  • preparing

receipts.route.js : 9 : add patch receipt router

 

  • README.md

README.md : 33 : options API

 

 

예외처리 커밋 버전: 

https://github.com/verdantjuly/kiosk/tree/bd15075e80841f64e7e1c2da4fbb7509c43a74fc

 

 

주문관리 (2)

 

feat : Receipts PATCH API

 

  • Receipts PATCH API

receipts.controller.js:14~

receipts.service.js : 57~

receipts.repository.js 27~

receipts.route.js : 9

 

 

  • Refactoring

order_items.repository : 51, 55 remove next state

order_items.service.js : 80 : changed return 

 

주문관리 (2) 커밋 버전

https://github.com/verdantjuly/kiosk/tree/513d965835382f5a0cdbd185978bf36c262b7f55