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 | ||||
|         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 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user