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