mirror of
https://github.com/correl/elm-paginated.git
synced 2024-11-23 19:19:52 +00:00
Fix toTask to return a list, not the internal response type
This commit is contained in:
parent
9f045b8b68
commit
518ce5e133
1 changed files with 3 additions and 5 deletions
|
@ -130,9 +130,7 @@ send :
|
||||||
-> Request a
|
-> Request a
|
||||||
-> Cmd msg
|
-> Cmd msg
|
||||||
send resultToMessage request =
|
send resultToMessage request =
|
||||||
httpRequest request
|
toTask request
|
||||||
|> Http.toTask
|
|
||||||
|> recurse
|
|
||||||
|> Task.attempt resultToMessage
|
|> Task.attempt resultToMessage
|
||||||
|
|
||||||
|
|
||||||
|
@ -142,9 +140,9 @@ This is only really useful if you want to chain together a bunch of
|
||||||
requests (or any other tasks) in a single command.
|
requests (or any other tasks) in a single command.
|
||||||
|
|
||||||
-}
|
-}
|
||||||
toTask : Request a -> Task Http.Error (Response a)
|
toTask : Request a -> Task Http.Error (List a)
|
||||||
toTask =
|
toTask =
|
||||||
httpRequest >> Http.toTask
|
httpRequest >> Http.toTask >> recurse
|
||||||
|
|
||||||
|
|
||||||
{-| Chains a paginated request task, fetching all available pages of
|
{-| Chains a paginated request task, fetching all available pages of
|
||||||
|
|
Loading…
Reference in a new issue