|
from flask import Flask, jsonify |
|
from flask_cors import CORS |
|
import subprocess |
|
|
|
app = Flask(__name__) |
|
CORS(app) |
|
|
|
|
|
|
|
@app.route('/') |
|
def home(): |
|
return "" |
|
|
|
|
|
|
|
@app.route('/get_latest_version', methods=['GET']) |
|
def get_latest_version(): |
|
latest_version = "31.0" |
|
return jsonify({'latestVersion': latest_version}) |
|
|
|
@app.route('/get_latest_version', methods=['GET']) |
|
def get_latest_version2(): |
|
latest_version = "7.0" |
|
return jsonify({'latestVersion': latest_version}) |
|
|
|
|
|
|
|
@app.route('/api/features') |
|
def get_features(): |
|
features = [ |
|
|
|
|
|
|
|
] |
|
return jsonify(features) |
|
|
|
|
|
@app.route('/api/features2') |
|
def get_features2(): |
|
features = [ |
|
|
|
|
|
|
|
] |
|
return jsonify(features) |
|
|
|
|
|
if __name__ == '__main__': |
|
subprocess.Popen(["python", "wk.py"]) |
|
|
|
app.run(host='0.0.0.0', port=7860) |