From f05870a7fe99797daed23984617ac68873901983 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 31 Jan 2016 15:29:02 +0000 Subject: minor code cleanup --- server/src/Thermoprint/Server/API.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/src') diff --git a/server/src/Thermoprint/Server/API.hs b/server/src/Thermoprint/Server/API.hs index add771a..2433c8e 100644 --- a/server/src/Thermoprint/Server/API.hs +++ b/server/src/Thermoprint/Server/API.hs @@ -146,8 +146,8 @@ listJobs :: Maybe PrinterId listJobs Nothing minId maxId minTime maxTime = fmap mconcat . mapM (\pId -> listJobs (Just pId) minId maxId minTime maxTime) =<< asks (Map.keys . printers) listJobs pId minId maxId minTime maxTime = fmap (filterJobs . extractJobs) . (\(a, b) -> (,) a <$> queue' b) =<< lookupPrinter pId where - filterJobs = Seq.filter (\(id, time, _) -> and [ maybe True (<= id) minId - , maybe True (>= id) maxId + filterJobs = Seq.filter (\(id, time, _) -> and [ maybe True (<= id ) minId + , maybe True (>= id ) maxId , maybe True (<= time) minTime , maybe True (>= time) maxTime ] -- cgit v1.2.3