delete stock portfolio
This commit is contained in:
parent
912bfde7f6
commit
e8c6e40059
16
server.py
16
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')
|
||||
|
Loading…
Reference in New Issue
Block a user