Also pass email of the user for now

This commit is contained in:
PCoder 2019-09-14 17:38:10 +05:30
parent e1316bd07c
commit c91454e0d2

View file

@ -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)