Remove old commented-out code
This commit is contained in:
parent
e0f648383c
commit
ec2974eef3
38
webapi.py
38
webapi.py
@ -256,7 +256,7 @@ def api_create_brand():
|
|||||||
else:
|
else:
|
||||||
locdesc = None
|
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))
|
cur.execute("INSERT INTO brand (name, description) VALUES (%s, %s)", (locname, locdesc))
|
||||||
print("ran INSERT INTO brand (name, description) VALUES (%s, %s)")
|
print("ran INSERT INTO brand (name, description) VALUES (%s, %s)")
|
||||||
db.commit()
|
db.commit()
|
||||||
@ -264,41 +264,5 @@ def api_create_brand():
|
|||||||
return jsonify({'api_endpoint': '/api/v1/brand/name/{0}'.format(locname)})
|
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__":
|
if __name__ == "__main__":
|
||||||
print("Run with `flask` or a WSGI server!")
|
print("Run with `flask` or a WSGI server!")
|
||||||
|
Loading…
Reference in New Issue
Block a user