summaryrefslogtreecommitdiff
path: root/server/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'server/Main.hs')
-rw-r--r--server/Main.hs15
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