Fix Author

This commit is contained in:
Richard Feldman
2018-08-14 03:36:57 -04:00
parent 58194312b6
commit ad816cc3ff
13 changed files with 39 additions and 39 deletions

View File

@@ -54,7 +54,7 @@ import Html.Events exposing (onClick)
import Http
import HttpBuilder exposing (RequestBuilder, withExpect)
import Json.Decode as Decode exposing (Decoder)
import Json.Decode.Pipeline exposing (custom, required)
import Json.Decode.Pipeline exposing (custom, optional, required)
import Json.Encode as Encode exposing (Value)
import Profile exposing (Profile)
import Route exposing (Route)
@@ -229,8 +229,8 @@ decodeFromPair maybeCred ( prof, uname ) =
nonViewerDecoder : Profile -> Username -> Decoder Author
nonViewerDecoder prof uname =
Decode.field "following" Decode.bool
|> Decode.map (authorFromFollowing prof uname)
Decode.succeed (authorFromFollowing prof uname)
|> optional "following" Decode.bool False
authorFromFollowing : Profile -> Username -> Bool -> Author

View File

@@ -54,7 +54,7 @@ import Html.Events exposing (onClick)
import Http
import HttpBuilder exposing (RequestBuilder, withExpect)
import Json.Decode as Decode exposing (Decoder)
import Json.Decode.Pipeline exposing (custom, required)
import Json.Decode.Pipeline exposing (custom, optional, required)
import Json.Encode as Encode exposing (Value)
import Profile exposing (Profile)
import Route exposing (Route)
@@ -229,8 +229,8 @@ decodeFromPair maybeCred ( prof, uname ) =
nonViewerDecoder : Profile -> Username -> Decoder Author
nonViewerDecoder prof uname =
Decode.field "following" Decode.bool
|> Decode.map (authorFromFollowing prof uname)
Decode.succeed (authorFromFollowing prof uname)
|> optional "following" Decode.bool False
authorFromFollowing : Profile -> Username -> Bool -> Author

View File

@@ -54,7 +54,7 @@ import Html.Events exposing (onClick)
import Http
import HttpBuilder exposing (RequestBuilder, withExpect)
import Json.Decode as Decode exposing (Decoder)
import Json.Decode.Pipeline exposing (custom, required)
import Json.Decode.Pipeline exposing (custom, optional, required)
import Json.Encode as Encode exposing (Value)
import Profile exposing (Profile)
import Route exposing (Route)
@@ -229,8 +229,8 @@ decodeFromPair maybeCred ( prof, uname ) =
nonViewerDecoder : Profile -> Username -> Decoder Author
nonViewerDecoder prof uname =
Decode.field "following" Decode.bool
|> Decode.map (authorFromFollowing prof uname)
Decode.succeed (authorFromFollowing prof uname)
|> optional "following" Decode.bool False
authorFromFollowing : Profile -> Username -> Bool -> Author

View File

@@ -54,7 +54,7 @@ import Html.Events exposing (onClick)
import Http
import HttpBuilder exposing (RequestBuilder, withExpect)
import Json.Decode as Decode exposing (Decoder)
import Json.Decode.Pipeline exposing (custom, required)
import Json.Decode.Pipeline exposing (custom, optional, required)
import Json.Encode as Encode exposing (Value)
import Profile exposing (Profile)
import Route exposing (Route)
@@ -229,8 +229,8 @@ decodeFromPair maybeCred ( prof, uname ) =
nonViewerDecoder : Profile -> Username -> Decoder Author
nonViewerDecoder prof uname =
Decode.field "following" Decode.bool
|> Decode.map (authorFromFollowing prof uname)
Decode.succeed (authorFromFollowing prof uname)
|> optional "following" Decode.bool False
authorFromFollowing : Profile -> Username -> Bool -> Author

View File

@@ -54,7 +54,7 @@ import Html.Events exposing (onClick)
import Http
import HttpBuilder exposing (RequestBuilder, withExpect)
import Json.Decode as Decode exposing (Decoder)
import Json.Decode.Pipeline exposing (custom, required)
import Json.Decode.Pipeline exposing (custom, optional, required)
import Json.Encode as Encode exposing (Value)
import Profile exposing (Profile)
import Route exposing (Route)
@@ -229,8 +229,8 @@ decodeFromPair maybeCred ( prof, uname ) =
nonViewerDecoder : Profile -> Username -> Decoder Author
nonViewerDecoder prof uname =
Decode.field "following" Decode.bool
|> Decode.map (authorFromFollowing prof uname)
Decode.succeed (authorFromFollowing prof uname)
|> optional "following" Decode.bool False
authorFromFollowing : Profile -> Username -> Bool -> Author