diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2019-05-15 17:37:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-15 17:37:46 +0100 |
commit | 5f027a315fbf010c213ca6f88141404ed86d05ef (patch) | |
tree | 2b4c15b40a58edcca0ac4e0646a51369c916c0c6 /synapse/rest/client/v1/base.py | |
parent | Merge branch 'master' into develop (diff) | |
download | synapse-5f027a315fbf010c213ca6f88141404ed86d05ef.tar.xz |
Drop support for v2_alpha API prefix (#5190)
Diffstat (limited to 'synapse/rest/client/v1/base.py')
-rw-r--r-- | synapse/rest/client/v1/base.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/rest/client/v1/base.py b/synapse/rest/client/v1/base.py index c77d7aba68..dc63b661c0 100644 --- a/synapse/rest/client/v1/base.py +++ b/synapse/rest/client/v1/base.py @@ -19,7 +19,7 @@ import logging import re -from synapse.api.urls import CLIENT_PREFIX +from synapse.api.urls import CLIENT_API_PREFIX from synapse.http.servlet import RestServlet from synapse.rest.client.transactions import HttpTransactionCache @@ -36,12 +36,12 @@ def client_path_patterns(path_regex, releases=(0,), include_in_unstable=True): Returns: SRE_Pattern """ - patterns = [re.compile("^" + CLIENT_PREFIX + path_regex)] + patterns = [re.compile("^" + CLIENT_API_PREFIX + "/api/v1" + path_regex)] if include_in_unstable: - unstable_prefix = CLIENT_PREFIX.replace("/api/v1", "/unstable") + unstable_prefix = CLIENT_API_PREFIX + "/unstable" patterns.append(re.compile("^" + unstable_prefix + path_regex)) for release in releases: - new_prefix = CLIENT_PREFIX.replace("/api/v1", "/r%d" % release) + new_prefix = CLIENT_API_PREFIX + "/r%d" % (release,) patterns.append(re.compile("^" + new_prefix + path_regex)) return patterns |