diff options
author | stuebinm | 2022-03-28 17:07:03 +0200 |
---|---|---|
committer | stuebinm | 2022-03-28 17:07:03 +0200 |
commit | 82082e8b6f02f7fa003f8cf311122fa013ae641e (patch) | |
tree | 16f19da05557e1802539b4fd3578be5f532b2d10 /server/Main.hs | |
parent | d15920f72891db83a9b3a96d71a8d31c0f0920a0 (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 '')
-rw-r--r-- | server/Main.hs | 15 |
1 files changed, 7 insertions, 8 deletions
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 |