Updates for upstream IP handling

This commit is contained in:
3wc
2021-07-11 12:35:35 +02:00
parent b27d5b3c5b
commit 42edcd1c33
6 changed files with 11 additions and 13 deletions

View File

@ -10,7 +10,7 @@ from nanoid import generate
from capsulflask.auth import account_required
from capsulflask.db import get_model
bp = Blueprint("webapi", __name__, url_prefix="/api")
bp = Blueprint("publicapi", __name__, url_prefix="/api")
@bp.route("/capsul/create", methods=["POST"])
@account_required
@ -25,6 +25,8 @@ def capsul_create():
account_balance = get_account_balance(get_vms(), get_payments(), datetime.datetime.utcnow())
capacity_avaliable = current_app.config["HUB_MODEL"].capacity_avaliable(512*1024*1024)
request.json['ssh_authorized_key_count'] = 1
id, errors = _create(
vm_sizes,
operating_systems,