MonkeyBusiness/modules/ddr/eventlog_2.py

26 lines
781 B
Python
Raw Normal View History

2022-08-26 12:39:11 +02:00
import config
from fastapi import APIRouter, Request, Response
from core_common import core_process_request, core_prepare_response, E
router = APIRouter(prefix="/local2", tags=["local2"])
router.model_whitelist = ["MDX"]
2022-11-15 15:03:37 +01:00
@router.post("/{gameinfo}/eventlog_2/write")
async def ddr_eventlog_2_write(request: Request):
2022-08-26 12:39:11 +02:00
request_info = await core_process_request(request)
response = E.response(
E.eventlog_2(
E.gamesession(9999999, __type="s64"),
2022-09-27 11:32:54 +02:00
E.logsendflg(1, __type="s32"),
2022-08-26 12:39:11 +02:00
E.logerrlevel(0, __type="s32"),
E.evtidnosendflg(0, __type="s32"),
)
)
response_body, response_headers = await core_prepare_response(request, response)
return Response(content=response_body, headers=response_headers)