web: fix warnings
This commit is contained in:
parent
d262dff272
commit
7e0b74d431
@ -1,3 +1,5 @@
|
|||||||
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||||
|
|
||||||
{-# LANGUAGE FlexibleInstances #-}
|
{-# LANGUAGE FlexibleInstances #-}
|
||||||
{-# LANGUAGE NamedFieldPuns #-}
|
{-# LANGUAGE NamedFieldPuns #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
@ -96,30 +98,35 @@ getAccountnamesR = do
|
|||||||
selectRep $ do
|
selectRep $ do
|
||||||
provideJson $ journalAccountNames j
|
provideJson $ journalAccountNames j
|
||||||
|
|
||||||
|
getTransactionsR :: Handler TypedContent
|
||||||
getTransactionsR = do
|
getTransactionsR = 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 $ jtxns j
|
provideJson $ jtxns j
|
||||||
|
|
||||||
|
getPricesR :: Handler TypedContent
|
||||||
getPricesR = do
|
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 $ jmarketprices j
|
provideJson $ jmarketprices j
|
||||||
|
|
||||||
|
getCommoditiesR :: Handler TypedContent
|
||||||
getCommoditiesR = do
|
getCommoditiesR = 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 $ (M.keys . jinferredcommodities) j
|
provideJson $ (M.keys . jinferredcommodities) j
|
||||||
|
|
||||||
|
getAccountsR :: Handler TypedContent
|
||||||
getAccountsR = do
|
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 $ ledgerTopAccounts $ ledgerFromJournal Any j
|
||||||
|
|
||||||
|
getAccounttransactionsR :: Text -> Handler TypedContent
|
||||||
getAccounttransactionsR a = do
|
getAccounttransactionsR a = 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")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user