Solution for intro/part6
This commit is contained in:
@@ -40,12 +40,12 @@ src (Avatar maybeUrl) =
|
|||||||
|
|
||||||
resolveAvatarUrl : Maybe String -> String
|
resolveAvatarUrl : Maybe String -> String
|
||||||
resolveAvatarUrl maybeUrl =
|
resolveAvatarUrl maybeUrl =
|
||||||
{- 👉 TODO #1 of 2: return the user's avatar from maybeUrl, if maybeUrl actually
|
case maybeUrl of
|
||||||
contains one. If maybeUrl is Nothing, return this URL instead:
|
Just url ->
|
||||||
|
url
|
||||||
|
|
||||||
https://static.productionready.io/images/smiley-cyrus.jpg
|
Nothing ->
|
||||||
-}
|
"https://static.productionready.io/images/smiley-cyrus.jpg"
|
||||||
""
|
|
||||||
|
|
||||||
|
|
||||||
encode : Avatar -> Value
|
encode : Avatar -> Value
|
||||||
|
|||||||
@@ -572,6 +572,7 @@ toTagList tagString =
|
|||||||
-}
|
-}
|
||||||
String.split " " tagString
|
String.split " " tagString
|
||||||
|> List.map String.trim
|
|> List.map String.trim
|
||||||
|
|> List.filter (\str -> str /= "")
|
||||||
|
|
||||||
|
|
||||||
edit : Slug -> TrimmedForm -> Cred -> Http.Request (Article Full)
|
edit : Slug -> TrimmedForm -> Cred -> Http.Request (Article Full)
|
||||||
|
|||||||
Reference in New Issue
Block a user