should be users

This commit is contained in:
H. Shay 2024-11-20 13:48:24 -08:00
parent d7a6a8c4ea
commit 408e1de61e
3 changed files with 10 additions and 10 deletions

View file

@ -1451,7 +1451,7 @@ _Added in Synapse 1.116.0._
Fetches the count of the number of invites sent by the provided user ID across all rooms in the last 24 hours. Fetches the count of the number of invites sent by the provided user ID across all rooms in the last 24 hours.
``` ```
GET /_synapse/admin/v1/user/invite_count/$user_id GET /_synapse/admin/v1/users/invite_count/$user_id
``` ```
A response body like the following is returned: A response body like the following is returned:
@ -1469,7 +1469,7 @@ _Added in Synapse 1.120.0_
Fetches the number of rooms the provided user ID has joined in the last 24 hours. Fetches the number of rooms the provided user ID has joined in the last 24 hours.
``` ```
GET /_synapse/admin/v1/user/room_count/$user_id GET /_synapse/admin/v1/users/room_count/$user_id
``` ```
A response body like the following is returned: A response body like the following is returned:

View file

@ -1508,7 +1508,7 @@ class UserInvitesCount(RestServlet):
Return the count of invites that the user has sent in the last 24 hours Return the count of invites that the user has sent in the last 24 hours
""" """
PATTERNS = admin_patterns("/user/invite_count/(?P<user_id>[^/]*)$") PATTERNS = admin_patterns("/users/invite_count/(?P<user_id>[^/]*)$")
def __init__(self, hs: "HomeServer"): def __init__(self, hs: "HomeServer"):
self._auth = hs.get_auth() self._auth = hs.get_auth()
@ -1529,7 +1529,7 @@ class UserRoomJoinCount(RestServlet):
Return the count of rooms that the user has joined in the last 24 hours Return the count of rooms that the user has joined in the last 24 hours
""" """
PATTERNS = admin_patterns("/user/room_count/(?P<user_id>[^/]*)$") PATTERNS = admin_patterns("/users/room_count/(?P<user_id>[^/]*)$")
def __init__(self, hs: "HomeServer"): def __init__(self, hs: "HomeServer"):
self._auth = hs.get_auth() self._auth = hs.get_auth()

View file

@ -5533,7 +5533,7 @@ class GetInvitesFromUserTestCase(unittest.HomeserverTestCase):
channel = self.make_request( channel = self.make_request(
"GET", "GET",
f"/_synapse/admin/v1/user/invite_count/{self.bad_user}", f"/_synapse/admin/v1/users/invite_count/{self.bad_user}",
access_token=self.admin_tok, access_token=self.admin_tok,
) )
self.assertEqual(channel.code, 200) self.assertEqual(channel.code, 200)
@ -5543,7 +5543,7 @@ class GetInvitesFromUserTestCase(unittest.HomeserverTestCase):
self.reactor.advance(60 * 60 * 48 * 1000) self.reactor.advance(60 * 60 * 48 * 1000)
channel = self.make_request( channel = self.make_request(
"GET", "GET",
f"/_synapse/admin/v1/user/invite_count/{self.bad_user}", f"/_synapse/admin/v1/users/invite_count/{self.bad_user}",
access_token=self.admin_tok, access_token=self.admin_tok,
) )
self.assertEqual(channel.code, 200) self.assertEqual(channel.code, 200)
@ -5555,7 +5555,7 @@ class GetInvitesFromUserTestCase(unittest.HomeserverTestCase):
channel = self.make_request( channel = self.make_request(
"GET", "GET",
f"/_synapse/admin/v1/user/invite_count/{self.bad_user}", f"/_synapse/admin/v1/users/invite_count/{self.bad_user}",
access_token=self.admin_tok, access_token=self.admin_tok,
) )
self.assertEqual(channel.code, 200) self.assertEqual(channel.code, 200)
@ -5595,7 +5595,7 @@ class GetRoomCountForUserTestCase(unittest.HomeserverTestCase):
channel = self.make_request( channel = self.make_request(
"GET", "GET",
f"/_synapse/admin/v1/user/room_count/{self.bad_user}", f"/_synapse/admin/v1/users/room_count/{self.bad_user}",
access_token=self.admin_tok, access_token=self.admin_tok,
) )
self.assertEqual(channel.code, 200) self.assertEqual(channel.code, 200)
@ -5605,7 +5605,7 @@ class GetRoomCountForUserTestCase(unittest.HomeserverTestCase):
self.reactor.advance(60 * 60 * 48 * 1000) self.reactor.advance(60 * 60 * 48 * 1000)
channel = self.make_request( channel = self.make_request(
"GET", "GET",
f"/_synapse/admin/v1/user/room_count/{self.bad_user}", f"/_synapse/admin/v1/users/room_count/{self.bad_user}",
access_token=self.admin_tok, access_token=self.admin_tok,
) )
self.assertEqual(channel.code, 200) self.assertEqual(channel.code, 200)
@ -5617,7 +5617,7 @@ class GetRoomCountForUserTestCase(unittest.HomeserverTestCase):
channel = self.make_request( channel = self.make_request(
"GET", "GET",
f"/_synapse/admin/v1/user/room_count/{self.bad_user}", f"/_synapse/admin/v1/users/room_count/{self.bad_user}",
access_token=self.admin_tok, access_token=self.admin_tok,
) )
self.assertEqual(channel.code, 200) self.assertEqual(channel.code, 200)