Skip to content

Commit

Permalink
web, api: update for MarketPrice/PriceDirective change
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmichael committed Jun 13, 2019
1 parent ce0354d commit 6a62bd6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hledger-api/hledger-api.hs
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions hledger-lib/Hledger/Data/Prices.hs
Expand Up @@ -16,6 +16,7 @@ module Hledger.Data.Prices (
,mixedAmountValueAtDate
,mixedAmountApplyValuation
,priceLookup
,priceDirectiveToMarketPrice
,tests_Prices
)
where
Expand Down
2 changes: 1 addition & 1 deletion hledger-web/Hledger/Web/Handler/MiscR.hs
Expand Up @@ -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
Expand Down

0 comments on commit 6a62bd6

Please sign in to comment.