Solution for intro/part6

This commit is contained in:
Richard Feldman
2018-08-14 02:21:51 -04:00
parent 633a1efbd9
commit a28ef48931
2 changed files with 6 additions and 5 deletions

View File

@@ -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

View File

@@ -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)