Use local URLs etc
This commit is contained in:
@@ -16,9 +16,7 @@ url : List String -> String
|
||||
url paths =
|
||||
-- NOTE: Url.Builder takes care of percent-encoding special URL characters.
|
||||
-- See https://package.elm-lang.org/packages/elm/url/latest/Url#percentEncode
|
||||
Url.Builder.crossOrigin "https://conduit.productionready.io"
|
||||
("api" :: paths)
|
||||
[]
|
||||
Url.Builder.relative ("api" :: paths) []
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -208,7 +208,7 @@ decoder : Maybe Cred -> Decoder Author
|
||||
decoder maybeCred =
|
||||
Decode.succeed Tuple.pair
|
||||
|> custom Profile.decoder
|
||||
|> required "uname" Username.decoder
|
||||
|> required "username" Username.decoder
|
||||
|> Decode.andThen (decodeFromPair maybeCred)
|
||||
|
||||
|
||||
@@ -216,7 +216,8 @@ decodeFromPair : Maybe Cred -> ( Profile, Username ) -> Decoder Author
|
||||
decodeFromPair maybeCred ( prof, uname ) =
|
||||
case maybeCred of
|
||||
Nothing ->
|
||||
nonViewerDecoder prof uname
|
||||
-- If you're logged out, you can't be following anyone!
|
||||
Decode.succeed (IsNotFollowing (UnfollowedAuthor uname prof))
|
||||
|
||||
Just cred ->
|
||||
if uname == Cred.username cred then
|
||||
|
||||
@@ -63,4 +63,4 @@ avatarToUrl (Avatar maybeUrl) =
|
||||
|
||||
defaultPhotoUrl : String
|
||||
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