diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2016-01-31 15:29:02 +0000 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2016-01-31 15:29:02 +0000 |
commit | f05870a7fe99797daed23984617ac68873901983 (patch) | |
tree | 81835e25d2ce7c21150e483eb5f57ce2bf330630 | |
parent | f86101e3282efec94e48561b465b38cdaa28630c (diff) | |
download | thermoprint-f05870a7fe99797daed23984617ac68873901983.tar thermoprint-f05870a7fe99797daed23984617ac68873901983.tar.gz thermoprint-f05870a7fe99797daed23984617ac68873901983.tar.bz2 thermoprint-f05870a7fe99797daed23984617ac68873901983.tar.xz thermoprint-f05870a7fe99797daed23984617ac68873901983.zip |
minor code cleanup
-rw-r--r-- | server/src/Thermoprint/Server/API.hs | 4 |
1 files changed, 2 insertions, 2 deletions
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 | |||
146 | listJobs Nothing minId maxId minTime maxTime = fmap mconcat . mapM (\pId -> listJobs (Just pId) minId maxId minTime maxTime) =<< asks (Map.keys . printers) | 146 | listJobs Nothing minId maxId minTime maxTime = fmap mconcat . mapM (\pId -> listJobs (Just pId) minId maxId minTime maxTime) =<< asks (Map.keys . printers) |
147 | listJobs pId minId maxId minTime maxTime = fmap (filterJobs . extractJobs) . (\(a, b) -> (,) a <$> queue' b) =<< lookupPrinter pId | 147 | listJobs pId minId maxId minTime maxTime = fmap (filterJobs . extractJobs) . (\(a, b) -> (,) a <$> queue' b) =<< lookupPrinter pId |
148 | where | 148 | where |
149 | filterJobs = Seq.filter (\(id, time, _) -> and [ maybe True (<= id) minId | 149 | filterJobs = Seq.filter (\(id, time, _) -> and [ maybe True (<= id ) minId |
150 | , maybe True (>= id) maxId | 150 | , maybe True (>= id ) maxId |
151 | , maybe True (<= time) minTime | 151 | , maybe True (<= time) minTime |
152 | , maybe True (>= time) maxTime | 152 | , maybe True (>= time) maxTime |
153 | ] | 153 | ] |