From 1c2be8f924a9c3881d8afd7d4b15fc9d53d1859b Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Tue, 10 Sep 2024 13:44:06 +0200 Subject: [PATCH] bugfixing --- app/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/main.py b/app/main.py index 00d57a3..7304e4e 100755 --- a/app/main.py +++ b/app/main.py @@ -403,7 +403,7 @@ async def get_stock(data: HistoricalPrice, api_key: str = Security(get_api_key)) async def get_stock(data: HistoricalPrice, api_key: str = Security(get_api_key)): ticker = data.ticker.upper() time_period = data.timePeriod - + print(time_period) cache_key = f"export-price-data-{ticker}-{time_period}" cached_result = redis_client.get(cache_key) if cached_result: @@ -415,7 +415,7 @@ async def get_stock(data: HistoricalPrice, api_key: str = Security(get_api_key)) if time_period == '1day': try: - with open(f"json/historical-price/{time_period}/{ticker}.json", 'rb') as file: + with open(f"json/historical-price/max/{ticker}.json", 'rb') as file: res = orjson.loads(file.read()) except: res = []