Geek7 commited on
Commit
2273193
·
verified ·
1 Parent(s): ef6351b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
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
- return jsonify({
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():