aboutsummaryrefslogtreecommitdiff
path: root/common/src
diff options
context:
space:
mode:
Diffstat (limited to 'common/src')
-rw-r--r--common/src/Common/Model.hs2
-rw-r--r--common/src/Common/Model/EditPayment.hs3
-rw-r--r--common/src/Common/Model/SavedPayment.hs (renamed from common/src/Common/Model/CreatedPayment.hs)14
3 files changed, 10 insertions, 9 deletions
diff --git a/common/src/Common/Model.hs b/common/src/Common/Model.hs
index 64db890..1abc3e3 100644
--- a/common/src/Common/Model.hs
+++ b/common/src/Common/Model.hs
@@ -2,7 +2,6 @@ module Common.Model (module X) where
import Common.Model.Category as X
import Common.Model.CreateCategory as X
-import Common.Model.CreatedPayment as X
import Common.Model.CreateIncome as X
import Common.Model.CreatePayment as X
import Common.Model.Currency as X
@@ -17,5 +16,6 @@ import Common.Model.InitResult as X
import Common.Model.Payer as X
import Common.Model.Payment as X
import Common.Model.PaymentCategory as X
+import Common.Model.SavedPayment as X
import Common.Model.SignInForm as X
import Common.Model.User as X
diff --git a/common/src/Common/Model/EditPayment.hs b/common/src/Common/Model/EditPayment.hs
index d2c223f..8860b84 100644
--- a/common/src/Common/Model/EditPayment.hs
+++ b/common/src/Common/Model/EditPayment.hs
@@ -2,7 +2,7 @@ module Common.Model.EditPayment
( EditPayment(..)
) where
-import Data.Aeson (FromJSON)
+import Data.Aeson (FromJSON, ToJSON)
import Data.Text (Text)
import Data.Time.Calendar (Day)
import GHC.Generics (Generic)
@@ -21,3 +21,4 @@ data EditPayment = EditPayment
} deriving (Show, Generic)
instance FromJSON EditPayment
+instance ToJSON EditPayment
diff --git a/common/src/Common/Model/CreatedPayment.hs b/common/src/Common/Model/SavedPayment.hs
index c1bba29..f45c479 100644
--- a/common/src/Common/Model/CreatedPayment.hs
+++ b/common/src/Common/Model/SavedPayment.hs
@@ -1,5 +1,5 @@
-module Common.Model.CreatedPayment
- ( CreatedPayment(..)
+module Common.Model.SavedPayment
+ ( SavedPayment(..)
) where
import Data.Aeson (FromJSON, ToJSON)
@@ -8,10 +8,10 @@ import GHC.Generics (Generic)
import Common.Model.Payment (Payment)
import Common.Model.PaymentCategory (PaymentCategory)
-data CreatedPayment = CreatedPayment
- { _createdPayment_payment :: Payment
- , _createdPayment_paymentCategory :: PaymentCategory
+data SavedPayment = SavedPayment
+ { _savedPayment_payment :: Payment
+ , _savedPayment_paymentCategory :: PaymentCategory
} deriving (Show, Generic)
-instance FromJSON CreatedPayment
-instance ToJSON CreatedPayment
+instance FromJSON SavedPayment
+instance ToJSON SavedPayment