summaryrefslogtreecommitdiff
path: root/src/routes.php
blob: 21113dceabab0740efd36657bd91f752926863e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?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"])
    ->methods(["GET"]);

  $routes
    ->add("well_known_matrix_client", "/.well-known/matrix/client")
    ->controller([ServerDiscoveryController::class, "client"])
    ->methods(["GET"]);

  $routes
    ->add("well_known_matrix_support", "/.well-known/matrix/support")
    ->controller([ServerDiscoveryController::class, "support"])
    ->methods(["GET"]);

  $routes
    ->add("matrix_federation_version", "/_matrix/federation/v1/version")
    ->controller([ServerImplementationController::class, "version"])
    ->methods(["GET"]);

  $routes
    ->add("matrix_client_versions", "/_matrix/client/versions")
    ->controller([ServerImplementationController::class, "versions"])
    ->methods(["GET"]);

  # /_matrix/key/v2/server
  # /_matrix/key/v2/query
  # /_matrix/key/v2/query/{serverName}


};