Ensure that auction is not ended at the time of bid
[?]
May 18, 2016, 10:16 PM
FXJQACESPGTLPG5ELXBU3M3OQXUZQQIR7HPIEHQ3FNUTMWVH4WBACDependencies
- [2]
ASF3UPJLAdd auction creation and bid handlers - [3]
NLZ3JXLOFix formatting with stylish-haskell. - [4]
2XQD6KKKAdd invitation logic and clean up DBProg error handling. - [5]
QMRKFEPGRefactor QDB to use a free monad algebra instead. - [6]
O5FVTOM6Undo JSON silliness, enable a couple more routes. - [7]
5OI44E4EAdd authentication to auction search. - [*]
64C6AWH6Rename Ananke -> Quixotic, project reboot. - [*]
HALRDT2FAdded initial auction create route.
Change contents
- replacement in lib/Aftok/Database.hs at line 51
RaiseDBError :: forall x. DBError -> DBOp x -> DBOp xRaiseDBError :: forall x y. DBError -> DBOp x -> DBOp y - edit in lib/Aftok/Database.hs at line 57
| AuctionEnded - replacement in lib/Aftok/Database.hs at line 69
raiseSubjectNotFound :: DBOp x -> DBOp xraiseSubjectNotFound :: DBOp y -> DBOp x - replacement in lib/Aftok/Database.hs at line 172
let findAuc = FindAuction aidlet findOp = FindAuction aid - replacement in lib/Aftok/Database.hs at line 174
maybeAuc <- fc findAuc_ <- traverse (\auc -> checkProjectAuth (auc ^. A.projectId) uid findAuc) maybeAucmaybeAuc <- fc findOp_ <- traverse (\auc -> checkProjectAuth (auc ^. A.projectId) uid findOp) maybeAuc - edit in lib/Aftok/Database.hs at line 177
findAuction' :: AuctionId -> UserId -> DBProg AuctionfindAuction' aid uid =let findOp = FindAuction aidin domaybeAuc <- fc findOp_ <- traverse (\auc -> checkProjectAuth (auc ^. A.projectId) uid findOp) maybeAucmaybe (fc $ raiseSubjectNotFound findOp) pure maybeAuc - replacement in lib/Aftok/Database.hs at line 187
createBid aid uid bid = domaybeAuc <- findAuction aid uidcreateBid aid uid bid = - replacement in lib/Aftok/Database.hs at line 189
fc $ maybe (raiseSubjectNotFound createOp) (const createOp) maybeAuc[2.176]in doauc <- findAuction' aid uidfc $ if view bidTime bid > view auctionEnd aucthen raiseOpForbidden uid AuctionEnded createOpelse createOp - edit in server/Aftok/Snaplet/Auctions.hs at line 68[2.1576]