Revert "Add some parsing stuff to finished/ for Tag"
This reverts commit 2bd0c78583.
This commit is contained in:
@@ -14,9 +14,8 @@ module Request.Article
|
||||
, update
|
||||
)
|
||||
|
||||
import Data.Article as Article exposing (Article, Body, slugToString)
|
||||
import Data.Article as Article exposing (Article, Body, Tag, slugToString)
|
||||
import Data.Article.Feed as Feed exposing (Feed)
|
||||
import Data.Article.Tag as Tag exposing (Tag)
|
||||
import Data.AuthToken exposing (AuthToken, withAuthorization)
|
||||
import Data.User as User exposing (Username)
|
||||
import Http
|
||||
@@ -69,7 +68,7 @@ defaultListConfig =
|
||||
|
||||
list : ListConfig -> Maybe AuthToken -> Http.Request Feed
|
||||
list config maybeToken =
|
||||
[ ( "tag", Maybe.map Tag.toString config.tag )
|
||||
[ ( "tag", Maybe.map Article.tagToString config.tag )
|
||||
, ( "author", Maybe.map User.usernameToString config.author )
|
||||
, ( "favorited", Maybe.map User.usernameToString config.favorited )
|
||||
, ( "limit", Just (toString config.limit) )
|
||||
@@ -115,7 +114,7 @@ feed config token =
|
||||
|
||||
tags : Http.Request (List Tag)
|
||||
tags =
|
||||
Decode.field "tags" (Decode.list Tag.decoder)
|
||||
Decode.field "tags" (Decode.list Article.tagDecoder)
|
||||
|> Http.get (apiUrl "/tags")
|
||||
|
||||
|
||||
@@ -170,7 +169,7 @@ type alias CreateConfig record =
|
||||
| title : String
|
||||
, description : String
|
||||
, body : String
|
||||
, tags : List Tag
|
||||
, tags : List String
|
||||
}
|
||||
|
||||
|
||||
@@ -195,7 +194,7 @@ create config token =
|
||||
[ ( "title", Encode.string config.title )
|
||||
, ( "description", Encode.string config.description )
|
||||
, ( "body", Encode.string config.body )
|
||||
, ( "tagList", Encode.list (List.map Tag.encode config.tags) )
|
||||
, ( "tagList", Encode.list (List.map Encode.string config.tags) )
|
||||
]
|
||||
|
||||
body =
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module Request.Article.Comments exposing (delete, list, post)
|
||||
|
||||
import Data.Article as Article exposing (Article, slugToString)
|
||||
import Data.Article as Article exposing (Article, Tag, slugToString)
|
||||
import Data.Article.Comment as Comment exposing (Comment, CommentId)
|
||||
import Data.AuthToken exposing (AuthToken, withAuthorization)
|
||||
import Http
|
||||
|
||||
Reference in New Issue
Block a user