From c91454e0d2e8accb5f49782bcd4f2be83971794e Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 14 Sep 2019 17:38:10 +0530 Subject: [PATCH] Also pass email of the user for now --- commands/product.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/commands/product.py b/commands/product.py index 1564b54..2d45a38 100755 --- a/commands/product.py +++ b/commands/product.py @@ -53,11 +53,13 @@ def add(name, realm, seed, product_name, product_description, product_type, @click.option("--name", envvar="OTP_NAME", required=True) @click.option("--realm", envvar="OTP_REALM", required=True) @click.option("--seed", envvar="OTP_SEED", required=True) +@click.option("--email", required=True) @click.option("--product-id", help="The uuid of the product", required=True) -def order(name, realm, seed, product_id): +def order(name, realm, seed, product_id, email): data = { **OTPCredentials(name, realm, seed).get_json(), - "product_id": product_id + "product_id": product_id, + "email": email } r = requests.post("{}/product/order".format(config('UCLOUD_PAY_SERVER')), json=data)