This commit is contained in:
wiktr committed 2026-08-28 14:57:00 +02:00
1 parent 37442c9864
commit c3d61ada91
1 file changed
+4 -5
+4 -5
View File
@@ -336,8 +336,7 @@ def health():
# API for updating domain's IP # API for updating domain's IP
@app.route('/update', methods=["GET"]) @app.route('/update', methods=["GET"])
def update_addr(): def update_addr():
# try: try:
if True:
if 'domain' not in request.args: if 'domain' not in request.args:
return jsonify({"status": "400", "code": "domain-error", "comment": "Missing or invalid domain"}), 400 return jsonify({"status": "400", "code": "domain-error", "comment": "Missing or invalid domain"}), 400
domain = request.args['domain'] domain = request.args['domain']
@@ -368,9 +367,9 @@ def update_addr():
return jsonify({"status": "500", "code": "internal-server-error", "comment": "An error occurred while processing request"}), 500 return jsonify({"status": "500", "code": "internal-server-error", "comment": "An error occurred while processing request"}), 500
return jsonify({"status": "200", "code": "ok", "comment": "Updated successfully"}) return jsonify({"status": "200", "code": "ok", "comment": "Updated successfully"})
# except Exception as e: except Exception as e:
# print(e, flush=True) print(e, flush=True)
# return jsonify({"status": "500", "code": "internal-server-error", "comment": "An error occurred while processing request"}), 500 return jsonify({"status": "500", "code": "internal-server-error", "comment": "An error occurred while processing request"}), 500
if __name__ == '__main__': if __name__ == '__main__':