updated readme
parent
ae16b63e75
commit
5979f25ad8
10
README.md
10
README.md
|
|
@ -1 +1,11 @@
|
|||
# coupon-servant
|
||||
## Setup
|
||||
* put the postgres connection string in `Main.hs`
|
||||
* run `stack build` then
|
||||
* run `stack exec coupon-servant-exe` to start the server
|
||||
|
||||
|
||||
## Testing
|
||||
* run `docker pull swaggerapi/swagger-ui` to download swagger-ui container
|
||||
* run `docker run -d --name swui -e API_URL="http://localhost:3000/swagger.json" -p 5341:8080/tcp swaggerapi/swagger-ui`
|
||||
* point your browser to [swagger-ui](http://localhost:5341)
|
||||
|
|
@ -95,6 +95,7 @@ computeBill c b = do productLimit <- couponApplicable
|
|||
return $ customerLimit $ entityVal <$> cm
|
||||
upsProdCoupon (ProductFlat cf) = do upsertBy (newUprod cf) (newProdCoupon cf b) [ProductCouponPused +=. 1]
|
||||
return ()
|
||||
--TODO - how to update product table for cart coupons
|
||||
upsProdCoupon _ = return ()
|
||||
priceLimit = couponMin_price c < billAmount b
|
||||
couponUsageLimit = couponUsed c < couponUsage_limit c
|
||||
|
|
|
|||
Loading…
Reference in New Issue