mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-21 17:15:38 +03:00
should be users
This commit is contained in:
parent
d7a6a8c4ea
commit
408e1de61e
3 changed files with 10 additions and 10 deletions
|
@ -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.
|
||||
|
||||
```
|
||||
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:
|
||||
|
@ -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.
|
||||
|
||||
```
|
||||
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:
|
||||
|
|
|
@ -1508,7 +1508,7 @@ class UserInvitesCount(RestServlet):
|
|||
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"):
|
||||
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
|
||||
"""
|
||||
|
||||
PATTERNS = admin_patterns("/user/room_count/(?P<user_id>[^/]*)$")
|
||||
PATTERNS = admin_patterns("/users/room_count/(?P<user_id>[^/]*)$")
|
||||
|
||||
def __init__(self, hs: "HomeServer"):
|
||||
self._auth = hs.get_auth()
|
||||
|
|
|
@ -5533,7 +5533,7 @@ class GetInvitesFromUserTestCase(unittest.HomeserverTestCase):
|
|||
|
||||
channel = self.make_request(
|
||||
"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,
|
||||
)
|
||||
self.assertEqual(channel.code, 200)
|
||||
|
@ -5543,7 +5543,7 @@ class GetInvitesFromUserTestCase(unittest.HomeserverTestCase):
|
|||
self.reactor.advance(60 * 60 * 48 * 1000)
|
||||
channel = self.make_request(
|
||||
"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,
|
||||
)
|
||||
self.assertEqual(channel.code, 200)
|
||||
|
@ -5555,7 +5555,7 @@ class GetInvitesFromUserTestCase(unittest.HomeserverTestCase):
|
|||
|
||||
channel = self.make_request(
|
||||
"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,
|
||||
)
|
||||
self.assertEqual(channel.code, 200)
|
||||
|
@ -5595,7 +5595,7 @@ class GetRoomCountForUserTestCase(unittest.HomeserverTestCase):
|
|||
|
||||
channel = self.make_request(
|
||||
"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,
|
||||
)
|
||||
self.assertEqual(channel.code, 200)
|
||||
|
@ -5605,7 +5605,7 @@ class GetRoomCountForUserTestCase(unittest.HomeserverTestCase):
|
|||
self.reactor.advance(60 * 60 * 48 * 1000)
|
||||
channel = self.make_request(
|
||||
"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,
|
||||
)
|
||||
self.assertEqual(channel.code, 200)
|
||||
|
@ -5617,7 +5617,7 @@ class GetRoomCountForUserTestCase(unittest.HomeserverTestCase):
|
|||
|
||||
channel = self.make_request(
|
||||
"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,
|
||||
)
|
||||
self.assertEqual(channel.code, 200)
|
||||
|
|
Loading…
Reference in a new issue