diff options
Diffstat (limited to 'src/server/Model/Income.hs')
-rw-r--r-- | src/server/Model/Income.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/Model/Income.hs b/src/server/Model/Income.hs index 119a44f..62ab0ed 100644 --- a/src/server/Model/Income.hs +++ b/src/server/Model/Income.hs @@ -1,7 +1,7 @@ module Model.Income ( getJsonIncome , getIncomes - , addIncome + , createIncome , deleteOwnIncome ) where @@ -23,10 +23,10 @@ getJsonIncome incomeEntity = getIncomes :: Persist [Entity Income] getIncomes = selectList [IncomeDeletedAt ==. Nothing] [] -addIncome :: UserId -> Day -> Int -> Persist IncomeId -addIncome userId day amount = do +createIncome :: UserId -> Day -> Int -> Persist IncomeId +createIncome userId date amount = do now <- liftIO getCurrentTime - insert (Income userId day amount now Nothing) + insert (Income userId date amount now Nothing) deleteOwnIncome :: Entity User -> IncomeId -> Persist Bool deleteOwnIncome user incomeId = do |