diff options
author | Joris | 2015-10-04 20:48:32 +0200 |
---|---|---|
committer | Joris | 2015-10-04 20:48:32 +0200 |
commit | 8c24464a4bd0a486cd0ddf846d3b5a323a7aaa9a (patch) | |
tree | cdd1bb79846b3d8865d833a122152528b03a4746 /src/client/Model/User.elm | |
parent | 303dfd66c6434e19ba226a133a35a74a557b3e93 (diff) |
Using incomes to compute a fair computation to designate the payer
Diffstat (limited to 'src/client/Model/User.elm')
-rw-r--r-- | src/client/Model/User.elm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/Model/User.elm b/src/client/Model/User.elm index b0d62a6..1412913 100644 --- a/src/client/Model/User.elm +++ b/src/client/Model/User.elm @@ -25,7 +25,9 @@ usersDecoder = Json.map Dict.fromList (Json.list userWithIdDecoder) userWithIdDecoder : Json.Decoder (UserId, User) userWithIdDecoder = - userDecoder `Json.andThen` (\user -> Json.map (\id -> (id, user)) ("id" := userIdDecoder)) + Json.object2 (,) + ("id" := userIdDecoder) + userDecoder userDecoder : Json.Decoder User userDecoder = |