web: /accounts: return all accounts, not just top-level ones (#985)

Accounts are returned as a flat list, in tree order, with asubs fields
empty.
This commit is contained in:
Simon Michael 2019-03-09 15:29:22 -08:00
parent 92fb24b1af
commit 7c14e10858

View File

@ -83,7 +83,7 @@ getAccountsR = 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 $ ledgerTopAccounts $ ledgerFromJournal Any j provideJson $ laccounts $ ledgerFromJournal Any j
getAccounttransactionsR :: Text -> Handler TypedContent getAccounttransactionsR :: Text -> Handler TypedContent
getAccounttransactionsR a = do getAccounttransactionsR a = do