Skip to content

Commit

Permalink
fix: staff user field decoding (thx @vjousse)
Browse files Browse the repository at this point in the history
  • Loading branch information
n1k0 committed Jan 8, 2025
1 parent e0f5487 commit 49ba6f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Data/User.elm
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ decode =
|> Pipe.required "email" Decode.string
|> Pipe.required "first_name" Decode.string
|> Pipe.required "last_name" Decode.string
|> Pipe.required "staff" Decode.bool
|> Pipe.optional "staff" Decode.bool False
|> Pipe.required "token" Decode.string


Expand All @@ -46,6 +46,7 @@ encode user =
, ( "last_name", Encode.string user.lastname )
, ( "organization", Encode.string user.company )
, ( "terms_of_use", Encode.bool user.cgu )
, ( "staff", Encode.bool user.staff )
, ( "token", Encode.string user.token )
]

Expand Down

0 comments on commit 49ba6f7

Please sign in to comment.