mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 00:24:54 -04:00
Host /unstable and /r0 versions of r0 APIs
This commit is contained in:
parent
af96c6f4d3
commit
14d7acfad4
27 changed files with 133 additions and 117 deletions
|
@ -18,7 +18,7 @@ from twisted.internet import defer
|
|||
|
||||
from synapse.api.errors import SynapseError
|
||||
from synapse.streams.config import PaginationConfig
|
||||
from .base import ClientV1RestServlet, client_path_pattern
|
||||
from .base import ClientV1RestServlet, client_path_patterns
|
||||
from synapse.events.utils import serialize_event
|
||||
|
||||
import logging
|
||||
|
@ -28,7 +28,7 @@ logger = logging.getLogger(__name__)
|
|||
|
||||
|
||||
class EventStreamRestServlet(ClientV1RestServlet):
|
||||
PATTERN = client_path_pattern("/events$")
|
||||
PATTERNS = client_path_patterns("/events$")
|
||||
|
||||
DEFAULT_LONGPOLL_TIME_MS = 30000
|
||||
|
||||
|
@ -72,7 +72,7 @@ class EventStreamRestServlet(ClientV1RestServlet):
|
|||
|
||||
# TODO: Unit test gets, with and without auth, with different kinds of events.
|
||||
class EventRestServlet(ClientV1RestServlet):
|
||||
PATTERN = client_path_pattern("/events/(?P<event_id>[^/]*)$")
|
||||
PATTERNS = client_path_patterns("/events/(?P<event_id>[^/]*)$")
|
||||
|
||||
def __init__(self, hs):
|
||||
super(EventRestServlet, self).__init__(hs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue