diff --git a/src/_server.py b/src/_server.py index 570874b..315c3ce 100644 --- a/src/_server.py +++ b/src/_server.py @@ -54,9 +54,12 @@ def health() -> bool: @app.post("/solve", response_model=SettledBatchAuctionModel) -async def solve(problem: BatchAuctionModel, request: Request): # type: ignore +async def solve(request: Request): # type: ignore """API POST solve endpoint handler""" - logging.debug(f"Received solve request {await request.json()}") + body = await request.json(); + logging.debug(f"Received solve request {body}") + + problem = BatchAuctionModel(**body) solver_args = SolverArgs.from_request(request=request, meta=problem.metadata) batch = BatchAuction.from_dict(problem.dict(), solver_args.instance_name)