From 4f39e5dbfa49d97637c1370d665e2380118955a1 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Tue, 12 Dec 2023 03:46:59 +0100 Subject: fix: fix sort --- app/Issue/Sort.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/Issue/Sort.hs b/app/Issue/Sort.hs index 772cd7f..1fe8644 100644 --- a/app/Issue/Sort.hs +++ b/app/Issue/Sort.hs @@ -29,7 +29,7 @@ data SortBy deriving (Show) defaultSort :: Sort -defaultSort = Sort Desc (SortByTag "@createdAt") +defaultSort = Sort Desc (SortByTag "createdAt") sortArg :: O.Parser [Sort] sortArg = @@ -52,7 +52,7 @@ applySorts :: [Sort] -> [Issue] -> [Issue] applySorts cs = compose (defaultSort : cs) where compose :: [Sort] -> ([Issue] -> [Issue]) - compose = foldr (.) id . map toSort + compose = foldr (flip (.)) id . map toSort toSort :: Sort -> ([Issue] -> [Issue]) toSort (Sort order sortBy') = -- cgit v1.2.3