diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2016-01-25 18:07:28 +0000 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2016-01-25 18:07:28 +0000 |
commit | f706b4e7fad48712e2032e27efb1318326db2569 (patch) | |
tree | bfa630d9de950cd89a8cd6565d5be84271944c0a /server/src | |
parent | fb76cda22eb5d778c6f274f3129efa705c78db16 (diff) | |
download | thermoprint-f706b4e7fad48712e2032e27efb1318326db2569.tar thermoprint-f706b4e7fad48712e2032e27efb1318326db2569.tar.gz thermoprint-f706b4e7fad48712e2032e27efb1318326db2569.tar.bz2 thermoprint-f706b4e7fad48712e2032e27efb1318326db2569.tar.xz thermoprint-f706b4e7fad48712e2032e27efb1318326db2569.zip |
abortJob should not return 404 on success
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/Thermoprint/Server/API.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/src/Thermoprint/Server/API.hs b/server/src/Thermoprint/Server/API.hs index 44b8402..2adca3c 100644 --- a/server/src/Thermoprint/Server/API.hs +++ b/server/src/Thermoprint/Server/API.hs | |||
@@ -148,7 +148,7 @@ abortJob jobId = do | |||
148 | current@(Queue pending _ _) <- readTVar $ queue p | 148 | current@(Queue pending _ _) <- readTVar $ queue p |
149 | let filtered = Seq.filter (/= castId jobId) pending | 149 | let filtered = Seq.filter (/= castId jobId) pending |
150 | writeTVar (queue p) $ current { pending = filtered } | 150 | writeTVar (queue p) $ current { pending = filtered } |
151 | return $ ((==) `on` length) pending filtered | 151 | return . not $ ((==) `on` length) pending filtered |
152 | when (not found) $ left err404 | 152 | when (not found) $ left err404 |
153 | 153 | ||
154 | listDrafts :: Handler (Map API.DraftId (Maybe DraftTitle)) | 154 | listDrafts :: Handler (Map API.DraftId (Maybe DraftTitle)) |