mirror of
https://github.com/drmext/MonkeyBusiness.git
synced 2024-11-28 09:20:53 +01:00
25 lines
681 B
Python
25 lines
681 B
Python
import config
|
|
|
|
from fastapi import APIRouter, Request, Response
|
|
|
|
from core_common import core_process_request, core_prepare_response, E
|
|
|
|
router = APIRouter(prefix="/core", tags=["pcbtracker"])
|
|
|
|
|
|
@router.post('/{gameinfo}/pcbtracker/alive')
|
|
async def pcbtracker_alive(request: Request):
|
|
request_info = await core_process_request(request)
|
|
|
|
response = E.response(
|
|
E.pcbtracker(
|
|
expire=1200,
|
|
ecenable=not config.maintenance_mode,
|
|
eclimit=0,
|
|
limit=0,
|
|
)
|
|
)
|
|
|
|
response_body, response_headers = await core_prepare_response(request, response)
|
|
return Response(content=response_body, headers=response_headers)
|