hotfix
This commit is contained in:
1 parent
37442c9864
commit
c3d61ada91
1 file changed
+4
-5
+4
-5
@@ -336,8 +336,7 @@ def health():
|
||||
# API for updating domain's IP
|
||||
@app.route('/update', methods=["GET"])
|
||||
def update_addr():
|
||||
# try:
|
||||
if True:
|
||||
try:
|
||||
if 'domain' not in request.args:
|
||||
return jsonify({"status": "400", "code": "domain-error", "comment": "Missing or invalid domain"}), 400
|
||||
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": "200", "code": "ok", "comment": "Updated successfully"})
|
||||
# except Exception as e:
|
||||
# print(e, flush=True)
|
||||
# return jsonify({"status": "500", "code": "internal-server-error", "comment": "An error occurred while processing request"}), 500
|
||||
except Exception as e:
|
||||
print(e, flush=True)
|
||||
return jsonify({"status": "500", "code": "internal-server-error", "comment": "An error occurred while processing request"}), 500
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in new issue
Block a user