web, api: update for MarketPrice/PriceDirective change
This commit is contained in:
parent
ce0354ddbe
commit
6a62bd6437
@ -152,7 +152,7 @@ hledgerApiApp staticdir j = Servant.serve api server
|
|||||||
where
|
where
|
||||||
accountnamesH = return $ journalAccountNames j
|
accountnamesH = return $ journalAccountNames j
|
||||||
transactionsH = return $ jtxns j
|
transactionsH = return $ jtxns j
|
||||||
pricesH = return $ jpricedirectives j
|
pricesH = return $ map priceDirectiveToMarketPrice $ jpricedirectives j
|
||||||
commoditiesH = return $ (M.keys . jinferredcommodities) j
|
commoditiesH = return $ (M.keys . jinferredcommodities) j
|
||||||
accountsH = return $ ledgerTopAccounts $ ledgerFromJournal Hledger.Query.Any j
|
accountsH = return $ ledgerTopAccounts $ ledgerFromJournal Hledger.Query.Any j
|
||||||
accounttransactionsH (a::AccountName) = do
|
accounttransactionsH (a::AccountName) = do
|
||||||
|
|||||||
@ -16,6 +16,7 @@ module Hledger.Data.Prices (
|
|||||||
,mixedAmountValueAtDate
|
,mixedAmountValueAtDate
|
||||||
,mixedAmountApplyValuation
|
,mixedAmountApplyValuation
|
||||||
,priceLookup
|
,priceLookup
|
||||||
|
,priceDirectiveToMarketPrice
|
||||||
,tests_Prices
|
,tests_Prices
|
||||||
)
|
)
|
||||||
where
|
where
|
||||||
|
|||||||
@ -69,7 +69,7 @@ getPricesR = do
|
|||||||
VD{caps, j} <- getViewData
|
VD{caps, j} <- getViewData
|
||||||
when (CapView `notElem` caps) (permissionDenied "Missing the 'view' capability")
|
when (CapView `notElem` caps) (permissionDenied "Missing the 'view' capability")
|
||||||
selectRep $ do
|
selectRep $ do
|
||||||
provideJson $ jpricedirectives j
|
provideJson $ map priceDirectiveToMarketPrice $ jpricedirectives j
|
||||||
|
|
||||||
getCommoditiesR :: Handler TypedContent
|
getCommoditiesR :: Handler TypedContent
|
||||||
getCommoditiesR = do
|
getCommoditiesR = do
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user