Use local URLs etc
This commit is contained in:
@@ -16,9 +16,7 @@ url : List String -> String
|
|||||||
url paths =
|
url paths =
|
||||||
-- NOTE: Url.Builder takes care of percent-encoding special URL characters.
|
-- NOTE: Url.Builder takes care of percent-encoding special URL characters.
|
||||||
-- See https://package.elm-lang.org/packages/elm/url/latest/Url#percentEncode
|
-- See https://package.elm-lang.org/packages/elm/url/latest/Url#percentEncode
|
||||||
Url.Builder.crossOrigin "https://conduit.productionready.io"
|
Url.Builder.relative ("api" :: paths) []
|
||||||
("api" :: paths)
|
|
||||||
[]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ decoder : Maybe Cred -> Decoder Author
|
|||||||
decoder maybeCred =
|
decoder maybeCred =
|
||||||
Decode.succeed Tuple.pair
|
Decode.succeed Tuple.pair
|
||||||
|> custom Profile.decoder
|
|> custom Profile.decoder
|
||||||
|> required "uname" Username.decoder
|
|> required "username" Username.decoder
|
||||||
|> Decode.andThen (decodeFromPair maybeCred)
|
|> Decode.andThen (decodeFromPair maybeCred)
|
||||||
|
|
||||||
|
|
||||||
@@ -216,7 +216,8 @@ decodeFromPair : Maybe Cred -> ( Profile, Username ) -> Decoder Author
|
|||||||
decodeFromPair maybeCred ( prof, uname ) =
|
decodeFromPair maybeCred ( prof, uname ) =
|
||||||
case maybeCred of
|
case maybeCred of
|
||||||
Nothing ->
|
Nothing ->
|
||||||
nonViewerDecoder prof uname
|
-- If you're logged out, you can't be following anyone!
|
||||||
|
Decode.succeed (IsNotFollowing (UnfollowedAuthor uname prof))
|
||||||
|
|
||||||
Just cred ->
|
Just cred ->
|
||||||
if uname == Cred.username cred then
|
if uname == Cred.username cred then
|
||||||
|
|||||||
@@ -63,4 +63,4 @@ avatarToUrl (Avatar maybeUrl) =
|
|||||||
|
|
||||||
defaultPhotoUrl : String
|
defaultPhotoUrl : String
|
||||||
defaultPhotoUrl =
|
defaultPhotoUrl =
|
||||||
"https://static.productionready.io/images/smiley-cyrus.jpg"
|
"http://localhost:3000/images/smiley-cyrus.jpg"
|
||||||
|
|||||||
BIN
advanced/server/public/images/smiley-cyrus.jpg
Normal file
BIN
advanced/server/public/images/smiley-cyrus.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Reference in New Issue
Block a user