-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain_api.py
More file actions
54 lines (34 loc) · 1.39 KB
/
main_api.py
File metadata and controls
54 lines (34 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
from flask import Flask, request, jsonify
from flask_cors import CORS
import rest_functions
app = Flask(__name__)
CORS(app)
@app.route('/gemini', methods=['POST'])
def process_message():
return rest_functions.process_message_function(request)
@app.route('/quit', methods=['POST'])
def quit_system():
return rest_functions.quit_system_function(request)
@app.route('/search', methods=['POST'])
def search_file():
return rest_functions.search_file_function(request)
@app.route('/secretary', methods=['POST'])
def search_secretary_procedure():
return rest_functions.search_secretary_procedure_function(request)
@app.route('/WenIndicators/Indicators/Display')
def get_wen_indicators():
return jsonify(rest_functions.get_json_file("indicators/data/indicadores.json"))
@app.route('/WenIndicators/Database/Display')
def get_wen_database():
return jsonify(rest_functions.get_json_file("indicators/rest/wen_indicators_database.json"))
@app.route('/WenIndicators/Replace/Display')
def get_wen_replace():
return jsonify(rest_functions.get_json_file("indicators/replace_list.json"))
@app.route('/WenIndicators/Results/Display')
def get_wen_results():
return jsonify(rest_functions.get_json_file("indicators/rest/wen_indicators_results.json"))
@app.route('/update')
def update_api():
return rest_functions.update()
if __name__ == "__main__":
app.run(host='0.0.0.0', port=5000)