Add created_at and auction_start timestamps to auction

[?]
Oct 29, 2016, 8:58 PM
5ZSKPQ3KY6T6O5S6T6HW4OHJMQXA72WKJSJJMGKGX2WMFTNZ7EGAC

Dependencies

  • [2] NAS4BFL4 Trivial stylish-haskell reformat.
  • [3] LAROLAYU WIP
  • [4] ASF3UPJL Add auction creation and bid handlers
  • [5] Z3MK2PJ5 Add GET handler for retrieving auction data.
  • [6] HALRDT2F Added initial auction create route.
  • [7] 7HPY3QPF Fix linting errors. (yay hlint!)
  • [8] QMRKFEPG Refactor QDB to use a free monad algebra instead.
  • [9] ZP62WC47 Begin conversion to build with stack.
  • [10] NEDDHXUK Reformat via stylish-haskell
  • [11] EKI57EJR Add alternative implementation of auction winner determination.
  • [12] 7VGYLTMU Clean up schema version handling.
  • [13] 5OI44E4E Add authentication to auction search.
  • [*] IZEVQF62 Work in progress replacing sqlite with postgres.
  • [*] 2XQD6KKK Add invitation logic and clean up DBProg error handling.

Change contents

  • replacement in lib/Aftok/Auction.hs at line 21
    [3.239][2.234:291](),[3.106][3.69:102](),[2.291][3.69:102](),[3.69][3.69:102](),[3.102][2.292:320](),[2.320][3.131:164](),[3.131][3.131:164](),[3.164][2.321:351]()
    { _projectId :: ProjectId
    , _initiator :: UserId
    --, _createdAt :: C.UTCTime
    , _raiseAmount :: Satoshi
    --, _auctionStart :: C.UTCTime
    , _auctionEnd :: C.UTCTime
    [3.239]
    [3.5319]
    { _projectId :: ProjectId
    , _initiator :: UserId
    , _createdAt :: C.UTCTime
    , _raiseAmount :: Satoshi
    , _auctionStart :: C.UTCTime
    , _auctionEnd :: C.UTCTime
  • edit in lib/Aftok/Database/PostgreSQL.hs at line 122
    [3.177]
    [3.275]
    <*> fieldWith utcParser
  • edit in lib/Aftok/Database/PostgreSQL.hs at line 124
    [3.309]
    [16.2144]
    <*> fieldWith utcParser
  • replacement in lib/Aftok/Database/PostgreSQL.hs at line 292
    [3.611][3.3136:3201]()
    "SELECT raise_amount, end_time FROM auctions WHERE id = ?"
    [3.611]
    [3.3377]
    "SELECT project_id, initiator_id, created_at, raise_amount, start_time, end_time FROM auctions WHERE id = ?"
  • replacement in server/Aftok/Snaplet/Auctions.hs at line 27
    [3.2994][3.2994:3076]()
    data AuctionCreateRequest = CA { raiseAmount :: Word64, auctionEnd :: C.UTCTime }
    [3.2994]
    [3.3076]
    data AuctionCreateRequest = CA { raiseAmount :: Word64, auctionStart :: C.UTCTime , auctionEnd :: C.UTCTime }
  • replacement in server/Aftok/Snaplet/Auctions.hs at line 31
    [3.5226][3.5226:5282]()
    p o = CA <$> o .: "raiseAmount" <*> o .: "auctionEnd"
    [3.5226]
    [3.885]
    p o = CA <$> o .: "raiseAmount"
    <*> o .: "auctionStart"
    <*> o .: "auctionEnd"
  • replacement in server/Aftok/Snaplet/Auctions.hs at line 47
    [3.3561][3.3561:3594](),[3.3594][3.1029:1121]()
    --t <- liftIO C.getCurrentTime
    snapEval . createAuction $ Auction pid uid (Satoshi . raiseAmount $ req) (auctionEnd req)
    [3.3561]
    [3.987]
    t <- liftIO C.getCurrentTime
    snapEval . createAuction $
    Auction pid uid t (Satoshi . raiseAmount $ req) (auctionStart req) (auctionEnd req)