tutor/www/src/Deck.elm

18 lines
316 B
Elm
Raw Normal View History

2023-01-10 02:22:46 +00:00
module Deck exposing (..)
import Json.Decode
import Json.Decode.Pipeline as JDP
type alias Deck =
{ id : Int
, name : String
}
decode : Json.Decode.Decoder Deck
decode =
Json.Decode.succeed Deck
|> JDP.required "deck_id" Json.Decode.int
|> JDP.required "name" Json.Decode.string