Initial WebUI + Old version compatibility
This commit is contained in:
parent
a7b9b5b87f
commit
98cc05198f
3 changed files with 390 additions and 321 deletions
|
@ -14,7 +14,10 @@ from . import hooks
|
|||
from . import object_storage
|
||||
import pymongo
|
||||
|
||||
from .webui import webui
|
||||
|
||||
app = FastAPI()
|
||||
app.include_router(webui.app)
|
||||
hook = hook_system.hook
|
||||
|
||||
|
||||
|
@ -288,7 +291,7 @@ async def stopMapPlay(
|
|||
playtime: int = Form(),
|
||||
totalDeaths: int = Form(),
|
||||
totalTime: int = Form(),
|
||||
fullClear: int = Form(),
|
||||
fullClear: int = Form(default=0), # old version compatibility
|
||||
replayData: str = Form(),
|
||||
Authorization: Union[str, None] = Header(default=None),
|
||||
):
|
||||
|
@ -409,9 +412,9 @@ async def upload_map(
|
|||
hideInChallenges: int = Form(),
|
||||
tags: str = Form(default=""),
|
||||
rng: int = Form(),
|
||||
numSubmaps: int = Form(),
|
||||
dragonCoins: int = Form(),
|
||||
replayVisibility: int = Form(),
|
||||
numSubmaps: int = Form(default=0), # Defaults here are set for
|
||||
dragonCoins: int = Form(default=0), # compatibility with
|
||||
replayVisibility: int = Form(default=0), # older game versions
|
||||
clientVersion: float = Form(),
|
||||
):
|
||||
authcheck = db.auth_check(Authorization)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue