diff --git a/src/API.hs b/src/API.hs index 4016b85..8ad9f98 100644 --- a/src/API.hs +++ b/src/API.hs @@ -46,3 +46,6 @@ type UserAPI = :<|> "buy" :> AuthProtect "header-auth" :> ReqBody '[JSON] [PurchaseDetail] :> Post '[JSON] PurchaseResult + + :<|> "journal" :> AuthProtect "header-auth" :> QueryParam "limit" Int + :> QueryParam "offset" Int :> Get '[JSON] [JournalEntry] diff --git a/src/Types/Journal.hs b/src/Types/Journal.hs new file mode 100644 index 0000000..a39492c --- /dev/null +++ b/src/Types/Journal.hs @@ -0,0 +1,11 @@ +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +module Types.Journal where + +data JournalEntry + = JournalEntry + { journalEntryDescription :: String + , journalEntryTimestamp :: UTCTime + , journalEntryAmount :: Int + , journalEntryIsCheck :: Bool + }