Remove old commented-out code

This commit is contained in:
BBaoVanC 2020-10-04 15:05:10 -05:00
parent e0f648383c
commit ec2974eef3
No known key found for this signature in database
GPG Key ID: 6D74C8B0E7D791C2

View File

@ -256,7 +256,7 @@ def api_create_brand():
else:
locdesc = None
print(locname, locdesc)
print(f"creating brand with name {locname} and description {locdesc}")
cur.execute("INSERT INTO brand (name, description) VALUES (%s, %s)", (locname, locdesc))
print("ran INSERT INTO brand (name, description) VALUES (%s, %s)")
db.commit()
@ -264,41 +264,5 @@ def api_create_brand():
return jsonify({'api_endpoint': '/api/v1/brand/name/{0}'.format(locname)})
# @app.route("/<location>/api/v1/item/<item>/<brand>/new_brand", methods = ["POST"])
# def api_new_brand(location, item, brand):
# try:
# storage.init_brand(location, item, brand)
# print("Created brand {0} under item {1} at {2}".format(brand, item, location))
# return jsonify({'status': 'success'})
# except storage.AlreadyExistsError:
# return jsonify({'status': 'error', 'error': 'BRAND_ALREADY_EXISTS'}), status.HTTP_403_FORBIDDEN
# @app.route("/<location>/api/v1/item/<item>/new_item", methods = ["POST"])
# def api_new_item(location, item):
# try:
# storage.init_item(location, item)
# print("Created item {0} at {1}".format(item, location))
# return jsonify({'status': 'success'})
# except storage.AlreadyExistsError:
# return jsonify({'status': 'error', 'error': 'ITEM_ALREADY_EXISTS'}), status.HTTP_403_FORBIDDEN
# @app.route("/<location>/api/v1/new_location", methods = ["POST"])
# def api_new_location(location):
# try:
# storage.init_location(location)
# print("Created location {0}".format(location))
# return jsonify({'status': 'success'})
# except storage.AlreadyExistsError:
# return jsonify({'status': 'error', 'error': 'ITEM_ALREADY_EXISTS'}), status.HTTP_403_FORBIDDEN
# @app.route("/<location>/api/v1/item/<item>/<brand>/add_amount/<amount>", methods = ["POST"])
# def api_add_amount(location, item, brand, amount):
# storage.increment_amount(location, item, brand, amount)
# return jsonify({'status': 'success'})
if __name__ == "__main__":
print("Run with `flask` or a WSGI server!")