From 7e0b74d431466689b98a00af9eba8a9846b2ef50 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Tue, 19 Feb 2019 07:29:08 -0800 Subject: [PATCH] web: fix warnings --- hledger-web/Hledger/Web/Handler/MiscR.hs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hledger-web/Hledger/Web/Handler/MiscR.hs b/hledger-web/Hledger/Web/Handler/MiscR.hs index 014036327..8e683a35c 100644 --- a/hledger-web/Hledger/Web/Handler/MiscR.hs +++ b/hledger-web/Hledger/Web/Handler/MiscR.hs @@ -1,3 +1,5 @@ +{-# OPTIONS_GHC -fno-warn-orphans #-} + {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} @@ -96,30 +98,35 @@ getAccountnamesR = do selectRep $ do provideJson $ journalAccountNames j +getTransactionsR :: Handler TypedContent getTransactionsR = do VD{caps, j} <- getViewData when (CapView `notElem` caps) (permissionDenied "Missing the 'view' capability") selectRep $ do provideJson $ jtxns j +getPricesR :: Handler TypedContent getPricesR = do VD{caps, j} <- getViewData when (CapView `notElem` caps) (permissionDenied "Missing the 'view' capability") selectRep $ do provideJson $ jmarketprices j +getCommoditiesR :: Handler TypedContent getCommoditiesR = do VD{caps, j} <- getViewData when (CapView `notElem` caps) (permissionDenied "Missing the 'view' capability") selectRep $ do provideJson $ (M.keys . jinferredcommodities) j +getAccountsR :: Handler TypedContent getAccountsR = do VD{caps, j} <- getViewData when (CapView `notElem` caps) (permissionDenied "Missing the 'view' capability") selectRep $ do provideJson $ ledgerTopAccounts $ ledgerFromJournal Any j +getAccounttransactionsR :: Text -> Handler TypedContent getAccounttransactionsR a = do VD{caps, j} <- getViewData when (CapView `notElem` caps) (permissionDenied "Missing the 'view' capability")