mirror of
https://github.com/Lost-MSth/Arcaea-server.git
synced 2026-02-08 00:37:38 +08:00
[Enhance] API user change
- Add a method of API to change the user's info
This commit is contained in:
@@ -70,11 +70,11 @@ def request_json_handle(request, required_keys=[], optional_keys=[]):
|
||||
json_data = loads(
|
||||
b64decode(request.args['query']).decode())
|
||||
else:
|
||||
return view(data, *args, **kwargs)
|
||||
json_data = {}
|
||||
|
||||
for key in required_keys:
|
||||
if key not in json_data:
|
||||
return error_return(PostError('Missing parameter: ' + key, api_error_code=-100))
|
||||
return error_return(PostError(f'Missing parameter: {key}', api_error_code=-100))
|
||||
data[key] = json_data[key]
|
||||
|
||||
for key in optional_keys:
|
||||
|
||||
Reference in New Issue
Block a user