Rename part5 to part8

This commit is contained in:
Richard Feldman
2018-08-13 06:09:31 -04:00
parent 91438546ba
commit 7ac13cb8f5
52 changed files with 2 additions and 2 deletions

View File

@@ -1,56 +0,0 @@
module Profile exposing (Profile, avatar, bio, decoder)
{-| A user's profile - potentially your own!
Contrast with Cred, which is the currently signed-in user.
-}
import Api
import Avatar exposing (Avatar)
import Http
import HttpBuilder exposing (RequestBuilder, withExpect)
import Json.Decode as Decode exposing (Decoder)
import Json.Decode.Pipeline exposing (required)
import Username exposing (Username)
import Viewer.Cred as Cred exposing (Cred)
-- TYPES
type Profile
= Profile Internals
type alias Internals =
{ bio : Maybe String
, avatar : Avatar
}
-- INFO
bio : Profile -> Maybe String
bio (Profile info) =
info.bio
avatar : Profile -> Avatar
avatar (Profile info) =
info.avatar
-- SERIALIZATION
decoder : Decoder Profile
decoder =
Decode.succeed Internals
|> required "bio" (Decode.nullable Decode.string)
|> required "image" Avatar.decoder
|> Decode.map Profile