summaryrefslogtreecommitdiff
path: root/server/Handlers.hs
diff options
context:
space:
mode:
authorstuebinm2022-03-28 17:07:03 +0200
committerstuebinm2022-03-28 17:07:03 +0200
commit82082e8b6f02f7fa003f8cf311122fa013ae641e (patch)
tree16f19da05557e1802539b4fd3578be5f532b2d10 /server/Handlers.hs
parentd15920f72891db83a9b3a96d71a8d31c0f0920a0 (diff)
server: show helpful information for result
This includes the backlink to the lobby (auto-generated only for now) and a "help!"-button for sending mails. Also general info regarding which commit was linted / published.
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