aboutsummaryrefslogtreecommitdiff
path: root/src/Endpoints/WellKnownClientEndpoint.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Endpoints/WellKnownClientEndpoint.hs')
-rw-r--r--src/Endpoints/WellKnownClientEndpoint.hs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Endpoints/WellKnownClientEndpoint.hs b/src/Endpoints/WellKnownClientEndpoint.hs
new file mode 100644
index 0000000..d091b1d
--- /dev/null
+++ b/src/Endpoints/WellKnownClientEndpoint.hs
@@ -0,0 +1,12 @@
+{-# LANGUAGE DataKinds #-}
+{-# LANGUAGE TypeOperators #-}
+
+module Endpoints.WellKnownClientEndpoint (WellKnownClientAPI, handleWellKnownClient) where
+
+import Servant
+import Data.WellKnownClientData
+
+type WellKnownClientAPI = ".well-known" :> "matrix" :> "client" :> Get '[JSON] WellKnownClient
+
+handleWellKnownClient :: Handler WellKnownClient
+handleWellKnownClient = return (makeWellKnownClient "http://localhost:8080" "http://localhost:8080")