diff --git a/server.py b/server.py index 6982b38..01b3b45 100755 --- a/server.py +++ b/server.py @@ -1516,6 +1516,22 @@ def setTop20or10(): +@app.route("/deletePortfolioSettings", methods=["POST"]) +def deletePortfolioSettings(): + value = request.data.decode('utf-8') + value2 = json.loads(value) + try: + with open("csv/portfolio_settings.json") as f: + data = json.load(f) + except: + data = {"symbols": {}} + try: + del data["symbols"][value2] + except: + pass + return index() + + @app.route("/fetchStockPortfolio", methods=["POST"]) def fetchStockPortfolio(): value = request.data.decode('utf-8')