From 518ce5e133ec60d0ff63f5f97ddeba59cd51969e Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Tue, 23 Jan 2018 10:17:20 -0500 Subject: [PATCH] Fix toTask to return a list, not the internal response type --- src/Paginated.elm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Paginated.elm b/src/Paginated.elm index fc0eb71..458069b 100644 --- a/src/Paginated.elm +++ b/src/Paginated.elm @@ -130,9 +130,7 @@ send : -> Request a -> Cmd msg send resultToMessage request = - httpRequest request - |> Http.toTask - |> recurse + toTask request |> 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. -} -toTask : Request a -> Task Http.Error (Response a) +toTask : Request a -> Task Http.Error (List a) toTask = - httpRequest >> Http.toTask + httpRequest >> Http.toTask >> recurse {-| Chains a paginated request task, fetching all available pages of