change dlclist
This commit is contained in:
parent
602f84ca28
commit
03afe47ca2
11
main.py
11
main.py
@ -167,6 +167,17 @@ async def getgameinfoext(request: Request, oldGameId: int):
|
|||||||
db = request.app.state.mongo
|
db = request.app.state.mongo
|
||||||
gameinfoext = db["gameinfoext"].find_one({"oldGameId": oldGameId},
|
gameinfoext = db["gameinfoext"].find_one({"oldGameId": oldGameId},
|
||||||
{"_id": 0})
|
{"_id": 0})
|
||||||
|
|
||||||
|
dlc_data = gameinfoext.get('dlcList')
|
||||||
|
new_data = list()
|
||||||
|
for one_line in dlc_data:
|
||||||
|
temp = {}
|
||||||
|
temp['name'] = one_line['name']
|
||||||
|
temp['oldGameId'] = one_line['oldGameId']
|
||||||
|
temp['price'] = one_line['price']
|
||||||
|
temp['icon'] = one_line['icon']
|
||||||
|
new_data.append(temp)
|
||||||
|
gameinfoext['dlcList'] = new_data
|
||||||
logger.info(f"get gameinfoext with {oldGameId} !")
|
logger.info(f"get gameinfoext with {oldGameId} !")
|
||||||
return JSONResponse(
|
return JSONResponse(
|
||||||
status_code=starlette.status.HTTP_200_OK,
|
status_code=starlette.status.HTTP_200_OK,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user