mirror of
https://github.com/Lost-MSth/Arcaea-server.git
synced 2026-02-11 18:47:26 +08:00
Minor fix
This commit is contained in:
@@ -21,7 +21,8 @@ from udpserver.udp_main import link_play
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from multiprocessing import Process, Pipe
|
from multiprocessing import Process, Pipe
|
||||||
import requests
|
if Config.USE_EXPERIMENTAL_AGGREGATE:
|
||||||
|
import requests
|
||||||
|
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
@@ -213,7 +214,7 @@ def present_info(user_id):
|
|||||||
if Config.USE_EXPERIMENTAL_AGGREGATE:
|
if Config.USE_EXPERIMENTAL_AGGREGATE:
|
||||||
@app.route(add_url_prefix('/compose/aggregate'), methods=['GET'])
|
@app.route(add_url_prefix('/compose/aggregate'), methods=['GET'])
|
||||||
@server.auth.auth_required(request)
|
@server.auth.auth_required(request)
|
||||||
def myaggregate(user_id):
|
def aggregate_experimental(user_id):
|
||||||
# 只有()才会requests.request('http://localhost')
|
# 只有()才会requests.request('http://localhost')
|
||||||
url_base:str='http'
|
url_base:str='http'
|
||||||
if Config.SSL_CERT and Config.SSL_KEY:
|
if Config.SSL_CERT and Config.SSL_KEY:
|
||||||
@@ -234,7 +235,6 @@ if Config.USE_EXPERIMENTAL_AGGREGATE:
|
|||||||
return jsonify(finally_response)
|
return jsonify(finally_response)
|
||||||
# I don't sure if the behavior is correct
|
# I don't sure if the behavior is correct
|
||||||
finally_response['value'].append({'id':i.get('id'),'value':resp.get('value') if hasattr(resp,'get') else resp})
|
finally_response['value'].append({'id':i.get('id'),'value':resp.get('value') if hasattr(resp,'get') else resp})
|
||||||
print(finally_response)
|
|
||||||
return jsonify(finally_response)
|
return jsonify(finally_response)
|
||||||
else:
|
else:
|
||||||
# 集成式请求,没想到什么好办法处理,就先这样写着
|
# 集成式请求,没想到什么好办法处理,就先这样写着
|
||||||
|
|||||||
Reference in New Issue
Block a user