From 359f837511597354bc6462cfc4200f54d647d728 Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Thu, 13 Aug 2015 22:55:41 +0200 Subject: Giving the payment id to the client --- src/client/Model/Payment.elm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/client/Model') 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) -- cgit v1.2.3