diff options
-rw-r--r-- | server/src/Thermoprint/Server/API.hs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/server/src/Thermoprint/Server/API.hs b/server/src/Thermoprint/Server/API.hs index 1bbefb1..9e28d58 100644 --- a/server/src/Thermoprint/Server/API.hs +++ b/server/src/Thermoprint/Server/API.hs | |||
@@ -143,7 +143,14 @@ jobStatus :: API.JobId -> Handler JobStatus | |||
143 | jobStatus jobId = maybe (left err404) return . lookup jobId . toList =<< listJobs Nothing Nothing Nothing | 143 | jobStatus jobId = maybe (left err404) return . lookup jobId . toList =<< listJobs Nothing Nothing Nothing |
144 | 144 | ||
145 | deleteJob :: API.JobId -> Handler () | 145 | deleteJob :: API.JobId -> Handler () |
146 | deleteJob = return undefined | 146 | deleteJob jobId = do |
147 | printerIds <- asks (Map.keys . printers) | ||
148 | forM_ printerIds $ \pId -> do | ||
149 | (pId', p) <- lookupPrinter $ Just pId | ||
150 | -- liftIO . atomically . modifyTVar' (queue p) $ force . removeNeedle | ||
151 | undefined | ||
152 | where | ||
153 | needle = JobKey . SqlBackendKey $ castId jobId | ||
147 | 154 | ||
148 | listDrafts :: Handler (Map API.DraftId (Maybe DraftTitle)) | 155 | listDrafts :: Handler (Map API.DraftId (Maybe DraftTitle)) |
149 | listDrafts = return undefined | 156 | listDrafts = return undefined |