mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 14:06:02 -04:00
New registration for C/S API v2. Only ReCAPTCHA working currently.
This commit is contained in:
parent
6f4f7e4e22
commit
59bf16eddc
8 changed files with 192 additions and 16 deletions
|
@ -40,6 +40,12 @@ def client_v2_pattern(path_regex):
|
|||
return re.compile("^" + CLIENT_V2_ALPHA_PREFIX + path_regex)
|
||||
|
||||
|
||||
def parse_request_allow_empty(request):
|
||||
content = request.content.read()
|
||||
if content == None or content == '':
|
||||
return None
|
||||
return simplejson.loads(content)
|
||||
|
||||
def parse_json_dict_from_request(request):
|
||||
try:
|
||||
content = simplejson.loads(request.content.read())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue