Skip to content
Permalink
Browse files

web, api: update for MarketPrice/PriceDirective change

  • Loading branch information...
simonmichael committed Jun 11, 2019
1 parent ce0354d commit 6a62bd6437c25b06ae936d6db90a207a38942bfa
Showing with 3 additions and 2 deletions.
  1. +1 −1 hledger-api/hledger-api.hs
  2. +1 −0 hledger-lib/Hledger/Data/Prices.hs
  3. +1 −1 hledger-web/Hledger/Web/Handler/MiscR.hs
@@ -152,7 +152,7 @@ hledgerApiApp staticdir j = Servant.serve api server
where
accountnamesH = return $ journalAccountNames j
transactionsH = return $ jtxns j
pricesH = return $ jpricedirectives j
pricesH = return $ map priceDirectiveToMarketPrice $ jpricedirectives j
commoditiesH = return $ (M.keys . jinferredcommodities) j
accountsH = return $ ledgerTopAccounts $ ledgerFromJournal Hledger.Query.Any j
accounttransactionsH (a::AccountName) = do
@@ -16,6 +16,7 @@ module Hledger.Data.Prices (
,mixedAmountValueAtDate
,mixedAmountApplyValuation
,priceLookup
,priceDirectiveToMarketPrice
,tests_Prices
)
where
@@ -69,7 +69,7 @@ getPricesR = do
VD{caps, j} <- getViewData
when (CapView `notElem` caps) (permissionDenied "Missing the 'view' capability")
selectRep $ do
provideJson $ jpricedirectives j
provideJson $ map priceDirectiveToMarketPrice $ jpricedirectives j

getCommoditiesR :: Handler TypedContent
getCommoditiesR = do

0 comments on commit 6a62bd6

Please sign in to comment.
You can’t perform that action at this time.