mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:46:06 -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
|
@ -21,7 +21,7 @@ from synapse.types import UserID
|
|||
|
||||
from canonicaljson import encode_canonical_json
|
||||
|
||||
from ._base import client_v2_pattern
|
||||
from ._base import client_v2_patterns
|
||||
|
||||
import simplejson as json
|
||||
import logging
|
||||
|
@ -54,7 +54,7 @@ class KeyUploadServlet(RestServlet):
|
|||
},
|
||||
}
|
||||
"""
|
||||
PATTERN = client_v2_pattern("/keys/upload/(?P<device_id>[^/]*)")
|
||||
PATTERNS = client_v2_patterns("/keys/upload/(?P<device_id>[^/]*)")
|
||||
|
||||
def __init__(self, hs):
|
||||
super(KeyUploadServlet, self).__init__()
|
||||
|
@ -154,12 +154,13 @@ class KeyQueryServlet(RestServlet):
|
|||
} } } } } }
|
||||
"""
|
||||
|
||||
PATTERN = client_v2_pattern(
|
||||
PATTERNS = client_v2_patterns(
|
||||
"/keys/query(?:"
|
||||
"/(?P<user_id>[^/]*)(?:"
|
||||
"/(?P<device_id>[^/]*)"
|
||||
")?"
|
||||
")?"
|
||||
")?",
|
||||
releases=()
|
||||
)
|
||||
|
||||
def __init__(self, hs):
|
||||
|
@ -245,10 +246,11 @@ class OneTimeKeyServlet(RestServlet):
|
|||
} } } }
|
||||
|
||||
"""
|
||||
PATTERN = client_v2_pattern(
|
||||
PATTERNS = client_v2_patterns(
|
||||
"/keys/claim(?:/?|(?:/"
|
||||
"(?P<user_id>[^/]*)/(?P<device_id>[^/]*)/(?P<algorithm>[^/]*)"
|
||||
")?)"
|
||||
")?)",
|
||||
releases=()
|
||||
)
|
||||
|
||||
def __init__(self, hs):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue