make draft fro journal
This commit is contained in:
parent
e3eb8e39c7
commit
64aaec2b98
2 changed files with 14 additions and 0 deletions
|
@ -46,3 +46,6 @@ type UserAPI =
|
||||||
|
|
||||||
:<|> "buy" :> AuthProtect "header-auth" :> ReqBody '[JSON] [PurchaseDetail]
|
:<|> "buy" :> AuthProtect "header-auth" :> ReqBody '[JSON] [PurchaseDetail]
|
||||||
:> Post '[JSON] PurchaseResult
|
:> Post '[JSON] PurchaseResult
|
||||||
|
|
||||||
|
:<|> "journal" :> AuthProtect "header-auth" :> QueryParam "limit" Int
|
||||||
|
:> QueryParam "offset" Int :> Get '[JSON] [JournalEntry]
|
||||||
|
|
11
src/Types/Journal.hs
Normal file
11
src/Types/Journal.hs
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{-# LANGUAGE DeriveGeneric #-}
|
||||||
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
|
module Types.Journal where
|
||||||
|
|
||||||
|
data JournalEntry
|
||||||
|
= JournalEntry
|
||||||
|
{ journalEntryDescription :: String
|
||||||
|
, journalEntryTimestamp :: UTCTime
|
||||||
|
, journalEntryAmount :: Int
|
||||||
|
, journalEntryIsCheck :: Bool
|
||||||
|
}
|
Loading…
Reference in a new issue