From b7e515570bde2d43c013f3a9cf5fb793826abd6c Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 11 Jan 2016 03:35:58 +0000 Subject: API cleanup --- spec/src/Thermoprint/API.hs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/spec/src/Thermoprint/API.hs b/spec/src/Thermoprint/API.hs index d722903..ac6acbe 100644 --- a/spec/src/Thermoprint/API.hs +++ b/spec/src/Thermoprint/API.hs @@ -33,11 +33,6 @@ data PrinterStatus = Busy JobId | Available deriving (Generic, Show, FromJSON, ToJSON) -data JobInfo = JobInfo - { jobPrinter :: PrinterId - , jobStatus :: JobStatus - } - data JobStatus = Queued | Printing | Done @@ -57,7 +52,8 @@ type ThermoprintAPI = "printers" :> Get '[JSON] (Set PrinterId) ) :<|> "job" :> Capture "jobId" JobId :> ( Get '[JSON] Printout - :<|> "status" :> Get '[JSON] JobInfo + :<|> "status" :> Get '[JSON] JobStatus + :<|> "printer" :> Get '[JSON] PrinterId :<|> Delete '[] () ) :<|> "drafts" :> ( -- cgit v1.2.3