Move stuff

This commit is contained in:
Richard Feldman
2018-08-05 04:13:33 -04:00
parent bf20622319
commit 7793c69762
3419 changed files with 6 additions and 7 deletions

View File

@@ -0,0 +1,23 @@
module Data.Profile exposing (Profile, decoder)
import Data.User as User exposing (Username)
import Data.UserPhoto as UserPhoto exposing (UserPhoto)
import Json.Decode as Decode exposing (Decoder)
import Json.Decode.Pipeline exposing (decode, required)
type alias Profile =
{ username : Username
, bio : Maybe String
, image : UserPhoto
, following : Bool
}
decoder : Decoder Profile
decoder =
decode Profile
|> required "username" User.usernameDecoder
|> required "bio" (Decode.nullable Decode.string)
|> required "image" UserPhoto.decoder
|> required "following" Decode.bool