mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 22:14:55 -04:00
Support registration / login with phone number
Changes from https://github.com/matrix-org/synapse/pull/1971
This commit is contained in:
parent
31f3ca1b2b
commit
73a5f06652
9 changed files with 395 additions and 50 deletions
|
@ -192,6 +192,16 @@ def parse_json_object_from_request(request):
|
|||
return content
|
||||
|
||||
|
||||
def assert_params_in_request(body, required):
|
||||
absent = []
|
||||
for k in required:
|
||||
if k not in body:
|
||||
absent.append(k)
|
||||
|
||||
if len(absent) > 0:
|
||||
raise SynapseError(400, "Missing params: %r" % absent, Codes.MISSING_PARAM)
|
||||
|
||||
|
||||
class RestServlet(object):
|
||||
|
||||
""" A Synapse REST Servlet.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue