From 82082e8b6f02f7fa003f8cf311122fa013ae641e Mon Sep 17 00:00:00 2001 From: stuebinm Date: Mon, 28 Mar 2022 17:07:03 +0200 Subject: 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. --- server/Handlers.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'server/Handlers.hs') 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 -- cgit v1.2.3