Update app.py
Browse files
app.py
CHANGED
@@ -137,19 +137,20 @@ def get_ip():
|
|
137 |
|
138 |
|
139 |
|
140 |
-
|
141 |
-
|
142 |
@app.route('/check_update', methods=['GET'])
|
143 |
def check_update():
|
144 |
installed_version = request.args.get("current_version", "0")
|
145 |
-
|
146 |
-
# ✅ Compare installed version with latest version
|
147 |
update_available = installed_version < LATEST_VERSION
|
148 |
|
149 |
-
|
150 |
"latest_version": LATEST_VERSION,
|
151 |
"update_available": update_available
|
152 |
})
|
|
|
|
|
|
|
|
|
|
|
153 |
|
154 |
@app.route('/get_apk_link', methods=['GET'])
|
155 |
def get_apk_link():
|
|
|
137 |
|
138 |
|
139 |
|
|
|
|
|
140 |
@app.route('/check_update', methods=['GET'])
|
141 |
def check_update():
|
142 |
installed_version = request.args.get("current_version", "0")
|
|
|
|
|
143 |
update_available = installed_version < LATEST_VERSION
|
144 |
|
145 |
+
response = jsonify({
|
146 |
"latest_version": LATEST_VERSION,
|
147 |
"update_available": update_available
|
148 |
})
|
149 |
+
response.headers["Content-Type"] = "application/json" # ✅ Ensure JSON response
|
150 |
+
return response
|
151 |
+
|
152 |
+
|
153 |
+
|
154 |
|
155 |
@app.route('/get_apk_link', methods=['GET'])
|
156 |
def get_apk_link():
|