make draft fro journal

This commit is contained in:
nek0 2019-08-08 18:59:23 +02:00
parent e3eb8e39c7
commit 64aaec2b98
2 changed files with 14 additions and 0 deletions

View file

@ -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]

11
src/Types/Journal.hs Normal file
View file

@ -0,0 +1,11 @@
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
module Types.Journal where
data JournalEntry
= JournalEntry
{ journalEntryDescription :: String
, journalEntryTimestamp :: UTCTime
, journalEntryAmount :: Int
, journalEntryIsCheck :: Bool
}