mirror of
https://github.com/drmext/MonkeyBusiness.git
synced 2024-11-24 07:00:15 +01:00
Fix ujson
This commit is contained in:
parent
3c6589a8f3
commit
f9214b3ca6
@ -8,7 +8,7 @@ for experimental local testing and playing
|
||||
|
||||
## Instructions
|
||||
|
||||
1. Install [python](https://www.python.org/ftp/python/3.11.1/python-3.11.1-amd64.exe) with "Add python.exe to PATH" checked
|
||||
1. Install [python](https://www.python.org/ftp/python/3.11.2/python-3.11.2-amd64.exe) with "Add python.exe to PATH" checked
|
||||
|
||||
1. Run `start.bat`
|
||||
|
||||
|
@ -17,7 +17,7 @@ from typing import Dict, List, Tuple
|
||||
from os import path
|
||||
|
||||
|
||||
router = APIRouter(prefix="/ddr", tags=["api"])
|
||||
router = APIRouter(prefix="/ddr", tags=["api_ddr"])
|
||||
|
||||
|
||||
class DDR_Profile_Main_Items(BaseModel):
|
||||
@ -149,7 +149,7 @@ async def ddr_scores_id(mcode: int):
|
||||
|
||||
|
||||
@router.get("/mcode/{mcode}/best")
|
||||
async def ddr_scores_id(mcode: int):
|
||||
async def ddr_scores_id_best(mcode: int):
|
||||
return get_db().table("ddr_scores_best").search((where("mcode") == mcode))
|
||||
|
||||
|
||||
@ -259,6 +259,6 @@ async def ddr_receive_mdb(file: UploadFile = File(...)) -> bytes:
|
||||
mdb[mcode] = mdb_old[mcode]
|
||||
|
||||
with open(ddr_metadata, "w", encoding="utf-8") as fp:
|
||||
json.dump(mdb, fp, indent=4, ensure_ascii=False)
|
||||
json.dump(mdb, fp, indent=4, ensure_ascii=False, escape_forward_slashes=False)
|
||||
|
||||
return Response(status_code=201)
|
||||
|
@ -55,7 +55,7 @@ app.add_middleware(
|
||||
if path.exists("webui"):
|
||||
webui = True
|
||||
with open(path.join("webui", "monkey.json"), "w") as f:
|
||||
json.dump(settings, f, indent=2)
|
||||
json.dump(settings, f, indent=2, escape_forward_slashes=False)
|
||||
app.mount("/webui", StaticFiles(directory="webui", html=True), name="webui")
|
||||
else:
|
||||
webui = False
|
||||
|
@ -1,19 +1,7 @@
|
||||
anyio==3.6.2
|
||||
asgiref==3.5.2
|
||||
click==8.1.3
|
||||
colorama==0.4.6
|
||||
fastapi==0.88.0
|
||||
h11==0.14.0
|
||||
idna==3.4
|
||||
kbinxml==1.7
|
||||
lxml==4.9.2
|
||||
pycryptodomex==3.16.0
|
||||
pydantic==1.10.2
|
||||
python-multipart==0.0.5
|
||||
six==1.16.0
|
||||
sniffio==1.3.0
|
||||
starlette==0.22.0
|
||||
tinydb==4.7.0
|
||||
typing_extensions==4.4.0
|
||||
ujson==5.6.0
|
||||
uvicorn[standard]==0.20.0
|
||||
fastapi
|
||||
kbinxml
|
||||
pycryptodomex
|
||||
python-multipart
|
||||
tinydb
|
||||
ujson
|
||||
uvicorn[standard]
|
||||
|
@ -19,7 +19,7 @@ if exist .venv\Lib\site-packages\ujson*.pyd (
|
||||
|
||||
echo:
|
||||
echo Install python with "Add python.exe to PATH" checked
|
||||
echo https://www.python.org/ftp/python/3.11.1/python-3.11.1-amd64.exe
|
||||
echo https://www.python.org/ftp/python/3.11.2/python-3.11.2-amd64.exe
|
||||
echo:
|
||||
|
||||
pause
|
||||
|
Loading…
Reference in New Issue
Block a user