Add regenerate endpoint
All checks were successful
HAProxy Manager Build and Push / Build-and-Push (push) Successful in 38s
All checks were successful
HAProxy Manager Build and Push / Build-and-Push (push) Successful in 38s
This commit is contained in:
parent
576666d9da
commit
ff46f0a616
@ -123,6 +123,17 @@ def health_check():
|
|||||||
'error': str(e)
|
'error': str(e)
|
||||||
}), 500
|
}), 500
|
||||||
|
|
||||||
|
@app.route('/regenerate', methods=['GET'])
|
||||||
|
def regenerate_conf():
|
||||||
|
try:
|
||||||
|
generate_config()
|
||||||
|
return jsonify({'status': 'success'}), 200
|
||||||
|
except Exception as e:
|
||||||
|
return jsonify({
|
||||||
|
'status': 'failed',
|
||||||
|
'error': str(e)
|
||||||
|
}), 500
|
||||||
|
|
||||||
@app.route('/api/domain', methods=['POST'])
|
@app.route('/api/domain', methods=['POST'])
|
||||||
def add_domain():
|
def add_domain():
|
||||||
data = request.get_json()
|
data = request.get_json()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user