Skip to content

Commit

Permalink
MDL-77917 Remove route names
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Jul 12, 2023
1 parent 1522fce commit d148d24
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions application/src/Controller/MatrixController.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ public function versions(): JsonResponse
}

/**
* @Route("/r0", name="endpoint")
* @Route("/v1", name="endpoint")
* @Route("/v2", name="endpoint")
* @Route("/v3", name="endpoint")
* @Route("/r0")
* @Route("/v1")
* @Route("/v2")
* @Route("/v3")
*/
public function endpoint(): JsonResponse
{
Expand Down Expand Up @@ -221,8 +221,8 @@ public function refresh(string $serverID, Request $request):JsonResponse {
/**
* Create Matrix room.
*
* @Route("/r0/createRoom", name="createRoom")
* @Route("/v3/createRoom", name="createRoom")
* @Route("/r0/createRoom")
* @Route("/v3/createRoom")
* @param string $serverID
* @param Request $request
* @return JsonResponse
Expand Down Expand Up @@ -275,8 +275,8 @@ public function createRoom(string $serverID, Request $request):JsonResponse {
/**
* Create Matrix room.
*
* @Route("/r0/rooms/{roomID}/kick", name="kick")
* @Route("/v3/rooms/{roomID}/kick", name="kick")
* @Route("/r0/rooms/{roomID}/kick")
* @Route("/v3/rooms/{roomID}/kick")
* @param Request $request
* @return JsonResponse
*/
Expand Down Expand Up @@ -333,6 +333,7 @@ public function kick(string $roomID, Request $request):JsonResponse {
public function roomState(string $serverID, string $roomID, string $eventType, Request $request):JsonResponse {
// 1. Check call auth.
// 2. Check HTTP method is accepted.

$accessCheck = $this->authHttpCheck(['PUT'], $request);
if (!$accessCheck['status']) {
return $accessCheck['message'];
Expand Down Expand Up @@ -392,8 +393,8 @@ public function roomState(string $serverID, string $roomID, string $eventType, R
/**
* Gets all joined members of a group.
*
* @Route("/r0/rooms/{roomID}/joined_members", name="getJoinedMembers")
* @Route("/v3/rooms/{roomID}/joined_members", name="getJoinedMembers")
* @Route("/r0/rooms/{roomID}/joined_members")
* @Route("/v3/rooms/{roomID}/joined_members")
* @param string $serverID
* @param string $roomID
* @param Request $request
Expand Down

0 comments on commit d148d24

Please sign in to comment.