aboutsummaryrefslogtreecommitdiff
path: root/src/client/Model/Payment.elm
diff options
context:
space:
mode:
authorJoris Guyonvarch2015-08-13 22:55:41 +0200
committerJoris Guyonvarch2015-08-13 22:55:41 +0200
commit359f837511597354bc6462cfc4200f54d647d728 (patch)
tree13d896bd1280a735945609e890faa606abd135fa /src/client/Model/Payment.elm
parent35557ae09d10aa6388b79e2e19ee7702efb28bc6 (diff)
downloadbudget-359f837511597354bc6462cfc4200f54d647d728.tar.gz
budget-359f837511597354bc6462cfc4200f54d647d728.tar.bz2
budget-359f837511597354bc6462cfc4200f54d647d728.zip
Giving the payment id to the client
Diffstat (limited to 'src/client/Model/Payment.elm')
-rw-r--r--src/client/Model/Payment.elm6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/Model/Payment.elm b/src/client/Model/Payment.elm
index 4a08027..ff8f157 100644
--- a/src/client/Model/Payment.elm
+++ b/src/client/Model/Payment.elm
@@ -10,7 +10,8 @@ import Json.Decode as Json exposing ((:=))
type alias Payments = List Payment
type alias Payment =
- { creation : Date
+ { id : String
+ , creation : Date
, name : String
, cost : Int
, userName : String
@@ -21,7 +22,8 @@ paymentsDecoder = Json.list paymentDecoder
paymentDecoder : Json.Decoder Payment
paymentDecoder =
- Json.object4 Payment
+ Json.object5 Payment
+ ("id" := Json.string)
("creation" := dateDecoder)
("name" := Json.string)
("cost" := Json.int)