mirror of
https://github.com/kuhyx/ARAI.git
synced 2026-07-04 13:03:02 +02:00
Merge branch 'MatSzpy' into kuhyx
This commit is contained in:
commit
9d7fcdc8a4
@ -1,18 +1,13 @@
|
|||||||
from flask import Flask, jsonify, request
|
from flask import Flask, request, jsonify
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
@app.route("/", methods=['POST'])
|
@app.route("/", methods=['GET'])
|
||||||
def recommended_mediators():
|
def recommended_mediators():
|
||||||
data = request.get_json()
|
data = request.get_json()
|
||||||
|
|
||||||
request_type = data.get('request_type', {}).get('request_type')
|
request_type = data.get('request_data', {})
|
||||||
request_data = data.get('request_data', {}).get('experts_called')
|
print(request_type)
|
||||||
generic_input = data.get('generic_input', {}).get('generic_input')
|
|
||||||
trial_cost = data.get('trial_cost', {}).get('trial_cost')
|
|
||||||
localization = data.get('localization', {}).get('localization')
|
|
||||||
experts_called = data.get('experts_called', {}).get('experts_called')
|
|
||||||
witnesses_called = data.get('witnesses_called', {}).get('witnesses_called')
|
|
||||||
|
|
||||||
top_5 = {
|
top_5 = {
|
||||||
"response_type": "recommended_mediators",
|
"response_type": "recommended_mediators",
|
||||||
@ -22,21 +17,21 @@ def recommended_mediators():
|
|||||||
}, [{
|
}, [{
|
||||||
"name": "Mateusz Szpyruk",
|
"name": "Mateusz Szpyruk",
|
||||||
"specialization": "Prawo podatkowe",
|
"specialization": "Prawo podatkowe",
|
||||||
"localization": localization,
|
"location": "Katowice",
|
||||||
"ai_rating": 99,
|
"ai_rating": 99,
|
||||||
"user_rating": 99,
|
"user_rating": 99,
|
||||||
"number_of_opinions": 5
|
"number_of_opinions": 5
|
||||||
}, {
|
}, {
|
||||||
"name": "Jan Kowalski",
|
"name": "Jan Kowalski",
|
||||||
"specialization": "Prawo pracy",
|
"specialization": "Prawo pracy",
|
||||||
"localization": localization,
|
"location": "Katowice",
|
||||||
"ai_rating": 90,
|
"ai_rating": 90,
|
||||||
"user_rating": 99,
|
"user_rating": 99,
|
||||||
"number_of_opinions": 5
|
"number_of_opinions": 5
|
||||||
}, {
|
}, {
|
||||||
"name": "Jan Kowalski",
|
"name": "Jan Kowalski",
|
||||||
"specialization": "Prawo pracy",
|
"specialization": "Prawo pracy",
|
||||||
"localization": localization,
|
"location": "Katowice",
|
||||||
"ai_rating": 90,
|
"ai_rating": 90,
|
||||||
"user_rating": 99,
|
"user_rating": 99,
|
||||||
"number_of_opinions": 5
|
"number_of_opinions": 5
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user