diff options
author | Joris Guyonvarch | 2015-08-13 22:55:41 +0200 |
---|---|---|
committer | Joris Guyonvarch | 2015-08-13 22:55:41 +0200 |
commit | 359f837511597354bc6462cfc4200f54d647d728 (patch) | |
tree | 13d896bd1280a735945609e890faa606abd135fa /src/client/Model | |
parent | 35557ae09d10aa6388b79e2e19ee7702efb28bc6 (diff) |
Giving the payment id to the client
Diffstat (limited to 'src/client/Model')
-rw-r--r-- | src/client/Model/Payment.elm | 6 |
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) |