Fix Author
This commit is contained in:
@@ -54,7 +54,7 @@ import Html.Events exposing (onClick)
|
|||||||
import Http
|
import Http
|
||||||
import HttpBuilder exposing (RequestBuilder, withExpect)
|
import HttpBuilder exposing (RequestBuilder, withExpect)
|
||||||
import Json.Decode as Decode exposing (Decoder)
|
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 Json.Encode as Encode exposing (Value)
|
||||||
import Profile exposing (Profile)
|
import Profile exposing (Profile)
|
||||||
import Route exposing (Route)
|
import Route exposing (Route)
|
||||||
@@ -229,8 +229,8 @@ decodeFromPair maybeCred ( prof, uname ) =
|
|||||||
|
|
||||||
nonViewerDecoder : Profile -> Username -> Decoder Author
|
nonViewerDecoder : Profile -> Username -> Decoder Author
|
||||||
nonViewerDecoder prof uname =
|
nonViewerDecoder prof uname =
|
||||||
Decode.field "following" Decode.bool
|
Decode.succeed (authorFromFollowing prof uname)
|
||||||
|> Decode.map (authorFromFollowing prof uname)
|
|> optional "following" Decode.bool False
|
||||||
|
|
||||||
|
|
||||||
authorFromFollowing : Profile -> Username -> Bool -> Author
|
authorFromFollowing : Profile -> Username -> Bool -> Author
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ import Html.Events exposing (onClick)
|
|||||||
import Http
|
import Http
|
||||||
import HttpBuilder exposing (RequestBuilder, withExpect)
|
import HttpBuilder exposing (RequestBuilder, withExpect)
|
||||||
import Json.Decode as Decode exposing (Decoder)
|
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 Json.Encode as Encode exposing (Value)
|
||||||
import Profile exposing (Profile)
|
import Profile exposing (Profile)
|
||||||
import Route exposing (Route)
|
import Route exposing (Route)
|
||||||
@@ -229,8 +229,8 @@ decodeFromPair maybeCred ( prof, uname ) =
|
|||||||
|
|
||||||
nonViewerDecoder : Profile -> Username -> Decoder Author
|
nonViewerDecoder : Profile -> Username -> Decoder Author
|
||||||
nonViewerDecoder prof uname =
|
nonViewerDecoder prof uname =
|
||||||
Decode.field "following" Decode.bool
|
Decode.succeed (authorFromFollowing prof uname)
|
||||||
|> Decode.map (authorFromFollowing prof uname)
|
|> optional "following" Decode.bool False
|
||||||
|
|
||||||
|
|
||||||
authorFromFollowing : Profile -> Username -> Bool -> Author
|
authorFromFollowing : Profile -> Username -> Bool -> Author
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ import Html.Events exposing (onClick)
|
|||||||
import Http
|
import Http
|
||||||
import HttpBuilder exposing (RequestBuilder, withExpect)
|
import HttpBuilder exposing (RequestBuilder, withExpect)
|
||||||
import Json.Decode as Decode exposing (Decoder)
|
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 Json.Encode as Encode exposing (Value)
|
||||||
import Profile exposing (Profile)
|
import Profile exposing (Profile)
|
||||||
import Route exposing (Route)
|
import Route exposing (Route)
|
||||||
@@ -229,8 +229,8 @@ decodeFromPair maybeCred ( prof, uname ) =
|
|||||||
|
|
||||||
nonViewerDecoder : Profile -> Username -> Decoder Author
|
nonViewerDecoder : Profile -> Username -> Decoder Author
|
||||||
nonViewerDecoder prof uname =
|
nonViewerDecoder prof uname =
|
||||||
Decode.field "following" Decode.bool
|
Decode.succeed (authorFromFollowing prof uname)
|
||||||
|> Decode.map (authorFromFollowing prof uname)
|
|> optional "following" Decode.bool False
|
||||||
|
|
||||||
|
|
||||||
authorFromFollowing : Profile -> Username -> Bool -> Author
|
authorFromFollowing : Profile -> Username -> Bool -> Author
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ import Html.Events exposing (onClick)
|
|||||||
import Http
|
import Http
|
||||||
import HttpBuilder exposing (RequestBuilder, withExpect)
|
import HttpBuilder exposing (RequestBuilder, withExpect)
|
||||||
import Json.Decode as Decode exposing (Decoder)
|
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 Json.Encode as Encode exposing (Value)
|
||||||
import Profile exposing (Profile)
|
import Profile exposing (Profile)
|
||||||
import Route exposing (Route)
|
import Route exposing (Route)
|
||||||
@@ -229,8 +229,8 @@ decodeFromPair maybeCred ( prof, uname ) =
|
|||||||
|
|
||||||
nonViewerDecoder : Profile -> Username -> Decoder Author
|
nonViewerDecoder : Profile -> Username -> Decoder Author
|
||||||
nonViewerDecoder prof uname =
|
nonViewerDecoder prof uname =
|
||||||
Decode.field "following" Decode.bool
|
Decode.succeed (authorFromFollowing prof uname)
|
||||||
|> Decode.map (authorFromFollowing prof uname)
|
|> optional "following" Decode.bool False
|
||||||
|
|
||||||
|
|
||||||
authorFromFollowing : Profile -> Username -> Bool -> Author
|
authorFromFollowing : Profile -> Username -> Bool -> Author
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ import Html.Events exposing (onClick)
|
|||||||
import Http
|
import Http
|
||||||
import HttpBuilder exposing (RequestBuilder, withExpect)
|
import HttpBuilder exposing (RequestBuilder, withExpect)
|
||||||
import Json.Decode as Decode exposing (Decoder)
|
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 Json.Encode as Encode exposing (Value)
|
||||||
import Profile exposing (Profile)
|
import Profile exposing (Profile)
|
||||||
import Route exposing (Route)
|
import Route exposing (Route)
|
||||||
@@ -229,8 +229,8 @@ decodeFromPair maybeCred ( prof, uname ) =
|
|||||||
|
|
||||||
nonViewerDecoder : Profile -> Username -> Decoder Author
|
nonViewerDecoder : Profile -> Username -> Decoder Author
|
||||||
nonViewerDecoder prof uname =
|
nonViewerDecoder prof uname =
|
||||||
Decode.field "following" Decode.bool
|
Decode.succeed (authorFromFollowing prof uname)
|
||||||
|> Decode.map (authorFromFollowing prof uname)
|
|> optional "following" Decode.bool False
|
||||||
|
|
||||||
|
|
||||||
authorFromFollowing : Profile -> Username -> Bool -> Author
|
authorFromFollowing : Profile -> Username -> Bool -> Author
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ import Html.Events exposing (onClick)
|
|||||||
import Http
|
import Http
|
||||||
import HttpBuilder exposing (RequestBuilder, withExpect)
|
import HttpBuilder exposing (RequestBuilder, withExpect)
|
||||||
import Json.Decode as Decode exposing (Decoder)
|
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 Json.Encode as Encode exposing (Value)
|
||||||
import Profile exposing (Profile)
|
import Profile exposing (Profile)
|
||||||
import Route exposing (Route)
|
import Route exposing (Route)
|
||||||
@@ -229,8 +229,8 @@ decodeFromPair maybeCred ( prof, uname ) =
|
|||||||
|
|
||||||
nonViewerDecoder : Profile -> Username -> Decoder Author
|
nonViewerDecoder : Profile -> Username -> Decoder Author
|
||||||
nonViewerDecoder prof uname =
|
nonViewerDecoder prof uname =
|
||||||
Decode.field "following" Decode.bool
|
Decode.succeed (authorFromFollowing prof uname)
|
||||||
|> Decode.map (authorFromFollowing prof uname)
|
|> optional "following" Decode.bool False
|
||||||
|
|
||||||
|
|
||||||
authorFromFollowing : Profile -> Username -> Bool -> Author
|
authorFromFollowing : Profile -> Username -> Bool -> Author
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ import Html.Events exposing (onClick)
|
|||||||
import Http
|
import Http
|
||||||
import HttpBuilder exposing (RequestBuilder, withExpect)
|
import HttpBuilder exposing (RequestBuilder, withExpect)
|
||||||
import Json.Decode as Decode exposing (Decoder)
|
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 Json.Encode as Encode exposing (Value)
|
||||||
import Profile exposing (Profile)
|
import Profile exposing (Profile)
|
||||||
import Route exposing (Route)
|
import Route exposing (Route)
|
||||||
@@ -232,8 +232,8 @@ decoderHelp maybeCred prof uname =
|
|||||||
|
|
||||||
nonViewerDecoder : Profile -> Username -> Decoder Author
|
nonViewerDecoder : Profile -> Username -> Decoder Author
|
||||||
nonViewerDecoder prof uname =
|
nonViewerDecoder prof uname =
|
||||||
Decode.field "following" Decode.bool
|
Decode.succeed (authorFromFollowing prof uname)
|
||||||
|> Decode.map (authorFromFollowing prof uname)
|
|> optional "following" Decode.bool False
|
||||||
|
|
||||||
|
|
||||||
authorFromFollowing : Profile -> Username -> Bool -> Author
|
authorFromFollowing : Profile -> Username -> Bool -> Author
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ import Html.Events exposing (onClick)
|
|||||||
import Http
|
import Http
|
||||||
import HttpBuilder exposing (RequestBuilder, withExpect)
|
import HttpBuilder exposing (RequestBuilder, withExpect)
|
||||||
import Json.Decode as Decode exposing (Decoder)
|
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 Json.Encode as Encode exposing (Value)
|
||||||
import Profile exposing (Profile)
|
import Profile exposing (Profile)
|
||||||
import Route exposing (Route)
|
import Route exposing (Route)
|
||||||
@@ -229,8 +229,8 @@ decodeFromPair maybeCred ( prof, uname ) =
|
|||||||
|
|
||||||
nonViewerDecoder : Profile -> Username -> Decoder Author
|
nonViewerDecoder : Profile -> Username -> Decoder Author
|
||||||
nonViewerDecoder prof uname =
|
nonViewerDecoder prof uname =
|
||||||
Decode.field "following" Decode.bool
|
Decode.succeed (authorFromFollowing prof uname)
|
||||||
|> Decode.map (authorFromFollowing prof uname)
|
|> optional "following" Decode.bool False
|
||||||
|
|
||||||
|
|
||||||
authorFromFollowing : Profile -> Username -> Bool -> Author
|
authorFromFollowing : Profile -> Username -> Bool -> Author
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ import Html.Events exposing (onClick)
|
|||||||
import Http
|
import Http
|
||||||
import HttpBuilder exposing (RequestBuilder, withExpect)
|
import HttpBuilder exposing (RequestBuilder, withExpect)
|
||||||
import Json.Decode as Decode exposing (Decoder)
|
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 Json.Encode as Encode exposing (Value)
|
||||||
import Profile exposing (Profile)
|
import Profile exposing (Profile)
|
||||||
import Route exposing (Route)
|
import Route exposing (Route)
|
||||||
@@ -229,8 +229,8 @@ decodeFromPair maybeCred ( prof, uname ) =
|
|||||||
|
|
||||||
nonViewerDecoder : Profile -> Username -> Decoder Author
|
nonViewerDecoder : Profile -> Username -> Decoder Author
|
||||||
nonViewerDecoder prof uname =
|
nonViewerDecoder prof uname =
|
||||||
Decode.field "following" Decode.bool
|
Decode.succeed (authorFromFollowing prof uname)
|
||||||
|> Decode.map (authorFromFollowing prof uname)
|
|> optional "following" Decode.bool False
|
||||||
|
|
||||||
|
|
||||||
authorFromFollowing : Profile -> Username -> Bool -> Author
|
authorFromFollowing : Profile -> Username -> Bool -> Author
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ import Html.Events exposing (onClick)
|
|||||||
import Http
|
import Http
|
||||||
import HttpBuilder exposing (RequestBuilder, withExpect)
|
import HttpBuilder exposing (RequestBuilder, withExpect)
|
||||||
import Json.Decode as Decode exposing (Decoder)
|
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 Json.Encode as Encode exposing (Value)
|
||||||
import Profile exposing (Profile)
|
import Profile exposing (Profile)
|
||||||
import Route exposing (Route)
|
import Route exposing (Route)
|
||||||
@@ -229,8 +229,8 @@ decodeFromPair maybeCred ( prof, uname ) =
|
|||||||
|
|
||||||
nonViewerDecoder : Profile -> Username -> Decoder Author
|
nonViewerDecoder : Profile -> Username -> Decoder Author
|
||||||
nonViewerDecoder prof uname =
|
nonViewerDecoder prof uname =
|
||||||
Decode.field "following" Decode.bool
|
Decode.succeed (authorFromFollowing prof uname)
|
||||||
|> Decode.map (authorFromFollowing prof uname)
|
|> optional "following" Decode.bool False
|
||||||
|
|
||||||
|
|
||||||
authorFromFollowing : Profile -> Username -> Bool -> Author
|
authorFromFollowing : Profile -> Username -> Bool -> Author
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ import Html.Events exposing (onClick)
|
|||||||
import Http
|
import Http
|
||||||
import HttpBuilder exposing (RequestBuilder, withExpect)
|
import HttpBuilder exposing (RequestBuilder, withExpect)
|
||||||
import Json.Decode as Decode exposing (Decoder)
|
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 Json.Encode as Encode exposing (Value)
|
||||||
import Profile exposing (Profile)
|
import Profile exposing (Profile)
|
||||||
import Route exposing (Route)
|
import Route exposing (Route)
|
||||||
@@ -229,8 +229,8 @@ decodeFromPair maybeCred ( prof, uname ) =
|
|||||||
|
|
||||||
nonViewerDecoder : Profile -> Username -> Decoder Author
|
nonViewerDecoder : Profile -> Username -> Decoder Author
|
||||||
nonViewerDecoder prof uname =
|
nonViewerDecoder prof uname =
|
||||||
Decode.field "following" Decode.bool
|
Decode.succeed (authorFromFollowing prof uname)
|
||||||
|> Decode.map (authorFromFollowing prof uname)
|
|> optional "following" Decode.bool False
|
||||||
|
|
||||||
|
|
||||||
authorFromFollowing : Profile -> Username -> Bool -> Author
|
authorFromFollowing : Profile -> Username -> Bool -> Author
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ import Html.Events exposing (onClick)
|
|||||||
import Http
|
import Http
|
||||||
import HttpBuilder exposing (RequestBuilder, withExpect)
|
import HttpBuilder exposing (RequestBuilder, withExpect)
|
||||||
import Json.Decode as Decode exposing (Decoder)
|
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 Json.Encode as Encode exposing (Value)
|
||||||
import Profile exposing (Profile)
|
import Profile exposing (Profile)
|
||||||
import Route exposing (Route)
|
import Route exposing (Route)
|
||||||
@@ -229,8 +229,8 @@ decodeFromPair maybeCred ( prof, uname ) =
|
|||||||
|
|
||||||
nonViewerDecoder : Profile -> Username -> Decoder Author
|
nonViewerDecoder : Profile -> Username -> Decoder Author
|
||||||
nonViewerDecoder prof uname =
|
nonViewerDecoder prof uname =
|
||||||
Decode.field "following" Decode.bool
|
Decode.succeed (authorFromFollowing prof uname)
|
||||||
|> Decode.map (authorFromFollowing prof uname)
|
|> optional "following" Decode.bool False
|
||||||
|
|
||||||
|
|
||||||
authorFromFollowing : Profile -> Username -> Bool -> Author
|
authorFromFollowing : Profile -> Username -> Bool -> Author
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ import Html.Events exposing (onClick)
|
|||||||
import Http
|
import Http
|
||||||
import HttpBuilder exposing (RequestBuilder, withExpect)
|
import HttpBuilder exposing (RequestBuilder, withExpect)
|
||||||
import Json.Decode as Decode exposing (Decoder)
|
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 Json.Encode as Encode exposing (Value)
|
||||||
import Profile exposing (Profile)
|
import Profile exposing (Profile)
|
||||||
import Route exposing (Route)
|
import Route exposing (Route)
|
||||||
@@ -229,8 +229,8 @@ decodeFromPair maybeCred ( prof, uname ) =
|
|||||||
|
|
||||||
nonViewerDecoder : Profile -> Username -> Decoder Author
|
nonViewerDecoder : Profile -> Username -> Decoder Author
|
||||||
nonViewerDecoder prof uname =
|
nonViewerDecoder prof uname =
|
||||||
Decode.field "following" Decode.bool
|
Decode.succeed (authorFromFollowing prof uname)
|
||||||
|> Decode.map (authorFromFollowing prof uname)
|
|> optional "following" Decode.bool False
|
||||||
|
|
||||||
|
|
||||||
authorFromFollowing : Profile -> Username -> Bool -> Author
|
authorFromFollowing : Profile -> Username -> Bool -> Author
|
||||||
|
|||||||
Reference in New Issue
Block a user