Add uuid to identify products
This commit is contained in:
parent
15911872f3
commit
73a7d9dc8b
1 changed files with 3 additions and 1 deletions
|
@ -9,6 +9,7 @@ from pyotp import TOTP
|
|||
|
||||
from config import etcd_client as client, logging, APP_PORT
|
||||
from stripe_utils import StripeUtils
|
||||
from uuid import uuid4
|
||||
|
||||
app = Flask(__name__)
|
||||
api = Api(app)
|
||||
|
@ -59,7 +60,8 @@ class AddProduct(Resource):
|
|||
return {"message": "Wrong Credentials"}, 403
|
||||
|
||||
try:
|
||||
product_key = "/v1/products/"
|
||||
product_uuid = uuid4().hex
|
||||
product_key = "/v1/products/{}".format(product_uuid)
|
||||
product_value = {
|
||||
"name": data["product_name"],
|
||||
"description": data["product_description"],
|
||||
|
|
Loading…
Reference in a new issue