summaryrefslogtreecommitdiff
path: root/src/routes.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes.php')
-rw-r--r--src/routes.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/routes.php b/src/routes.php
new file mode 100644
index 0000000..ff16ecc
--- /dev/null
+++ b/src/routes.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace App;
+
+use App\Controllers\ServerDiscoveryController;
+use App\Controllers\ServerImplementationController;
+use Symfony\Component\Routing\Loader\Configurator\RouteConfigurator;
+
+return function (RouteConfigurator $routes): void
+{
+ $routes
+ ->add("well_known_matrix_server", "/.well-known/matrix/server")
+ ->controller([ServerDiscoveryController::class, "server"]);
+
+ $routes
+ ->add("well_known_matrix_client", "/.well-known/matrix/client")
+ ->controller([ServerDiscoveryController::class, "client"]);
+
+ $routes
+ ->add("matrix_federation_version", "/_matrix/federation/v1/version")
+ ->controller([ServerImplementationController::class, "version"]);
+
+ # /_matrix/key/v2/server
+ # /_matrix/key/v2/query
+ # /_matrix/key/v2/query/{serverName}
+};