1
This commit is contained in:
parent
3a8712b357
commit
b80ee7f433
7
main.py
7
main.py
@ -193,14 +193,13 @@ async def getgameprice(request: Request, oldGameId: int, nums: int = 0):
|
||||
gameprice = db["gameprice"].find_one({"oldGameId": oldGameId},
|
||||
{"_id": 0})
|
||||
else:
|
||||
gameprice = db["gameprice"].find_one({"oldGameId": oldGameId},
|
||||
{"_id": 0})
|
||||
gameprice = db["gameprice"].find({"oldGameId": oldGameId}, {"_id": 0})
|
||||
if gameprice:
|
||||
price = gameprice.get('prices', [])
|
||||
gameprice['prices'] = price[:nums]
|
||||
else:
|
||||
logger.error(f"get price with {oldGameId} failed\n {gameprice}")
|
||||
gameprice = []
|
||||
gameprice = {}
|
||||
|
||||
logger.info(f"get gameprice with {oldGameId} !")
|
||||
return JSONResponse(
|
||||
@ -217,7 +216,7 @@ async def getgameinfoext(request: Request, oldGameId: int):
|
||||
if not gameinfoext:
|
||||
return JSONResponse(
|
||||
status_code=starlette.status.HTTP_200_OK,
|
||||
content="",
|
||||
content={},
|
||||
)
|
||||
dlc_data = gameinfoext.get('dlcList')
|
||||
new_data = list()
|
||||
|
Loading…
x
Reference in New Issue
Block a user