summaryrefslogtreecommitdiffstats
path: root/src/Types.elm
blob: de1cccfca0a86700a91ddee44d9f3c6ad9c4f8b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
module Types exposing (..)


type alias Model =
    { posts : List Post
    , displayError : DisplayableError
    }


type Msg
    = NoOp
    | FetchPostsSuccess (List Post)
    | FetchPostsFailure DisplayableError


type DisplayableError
    = Error String
    | NoError


type alias Author =
    { id : String
    , name : String
    }


type alias Post =
    { id : String
    , content : String
    , author : Author
    }