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/Main.hs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'server/Main.hs') diff --git a/server/Main.hs b/server/Main.hs index 6806ee7..0aafd65 100644 --- a/server/Main.hs +++ b/server/Main.hs @@ -44,11 +44,11 @@ import Servant.HTML.Lucid (HTML) import Servant.Server.StaticFiles (serveDirectoryWebApp) import Server (CliOptions (..), JobStatus, Org (..), - ServerState, Sha1, - emptyState, exneuland, - interval, loadConfig, - orgs, port, token, - verbose) + RemoteRef, ServerState, + Sha1, emptyState, + exneuland, interval, + loadConfig, orgs, port, + token, verbose) import Worker (Job (Job), linterThread) import Control.Monad.Logger (logInfoN, @@ -57,8 +57,7 @@ import Servant.API (Header) import Servant.API.WebSocket (WebSocketPending) import Servant.Client (ClientM, client, mkClientEnv, runClientM) -import Universum.Bool.Reexport (Bool) -import WithCli (HasArguments, withCli) +import WithCli (withCli) type family PolyEndpoint method format payload where PolyEndpoint Get format payload = @@ -72,7 +71,7 @@ type MapServiceAPI method = -- | abstract api type API format = - "status" :> Capture "org" Text :> Capture "jobid" Sha1 :> Get '[format] JobStatus + "status" :> Capture "org" Text :> Capture "jobid" Sha1 :> Get '[format] (Org True, RemoteRef, JobStatus, Maybe JobStatus) :<|> "status" :> Capture "org" Text :> Capture "jobid" Sha1 :> "relint" :> Post '[format] Text :<|> "status" :> Capture "org" Text :> Capture "jobid" Sha1 :> "realtime" :> WebSocketPending :<|> "admin" :> "overview" :> Get '[format] AdminOverview -- cgit v1.2.3