summaryrefslogtreecommitdiff
path: root/server/Handlers.hs
diff options
context:
space:
mode:
Diffstat (limited to 'server/Handlers.hs')
-rw-r--r--server/Handlers.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/server/Handlers.hs b/server/Handlers.hs
index 987b6df..d42e74d 100644
--- a/server/Handlers.hs
+++ b/server/Handlers.hs
@@ -30,9 +30,9 @@ import Network.WebSockets (PendingConnection, acceptRequest,
withPingThread)
import Servant (Handler, err404, throwError)
import Server (JobStatus (..), Org (orgUrl),
- RemoteRef (RemoteRef, reponame),
- ServerState, Sha1, adjustedPath,
- getJobStatus, unState)
+ RemoteRef (reponame), ServerState,
+ Sha1, adjustedPath, getJobStatus,
+ unState)
import Worker (Job (Job))
@@ -64,12 +64,12 @@ instance ToJSON MapService where
-statusImpl :: MVar ServerState -> Text -> Sha1 -> Handler JobStatus
+statusImpl :: MVar ServerState -> Text -> Sha1 -> Handler (Org True, RemoteRef, JobStatus, Maybe JobStatus)
statusImpl state orgslug sha1 = do
status <- liftIO $ getJobStatus state orgslug sha1
case status of
- Just (_,_,jobstatus,_) -> pure jobstatus
- Nothing -> throwError err404
+ Just stuff -> pure stuff
+ Nothing -> throwError err404
-- | since there are multiple apis that just get state information …
stateImpl