Slight changes with the checkout system
This commit is contained in:
@@ -3406,6 +3406,26 @@ def logout():
|
||||
flash('Logged out successfully', 'info')
|
||||
return redirect(url_for('login'))
|
||||
|
||||
@app.route('/booking_payment_async', methods=['POST'])
|
||||
def booking_payment_async():
|
||||
# ... Speichere Daten in DB ...
|
||||
# ... Starte das manage-tenants.sh Skript ASYNCHRON (z.B. Celery) ...
|
||||
return jsonify({"success": True, "tenant_slug": request.form['tenant_slug']}), 200
|
||||
|
||||
|
||||
@app.route('/instance_request/status')
|
||||
def tenant_status():
|
||||
slug = request.args.get('slug')
|
||||
# Prüfe in der Datenbank, ob das Skript für diesen Slug schon fertig ist
|
||||
if ist_fertig(slug):
|
||||
return jsonify({
|
||||
"status": "ready",
|
||||
"url": f"https://{slug}.invario-software.de",
|
||||
"username": "admin",
|
||||
"password": generiertes_passwort
|
||||
})
|
||||
else:
|
||||
return jsonify({"status": "pending"})
|
||||
|
||||
def main():
|
||||
app.run(host="0.0.0.0", port=4999, debug=False)
|
||||
|
||||
Reference in New Issue
Block a user