1
0
mirror of https://github.com/etesync/server synced 2024-11-19 07:18:08 +00:00

Type fix.

This commit is contained in:
Tom Hacohen 2024-06-08 18:17:59 -04:00
parent 49eeeefef5
commit 0d9c9f153d

View File

@ -61,6 +61,7 @@ class MsgpackRoute(APIRoute):
def get_route_handler(self) -> t.Callable:
async def custom_route_handler(request: Request) -> Response:
content_type = request.headers.get("Content-Type")
if content_type is not None:
try:
request_cls = self.REQUESTS_CLASSES[content_type]
request = request_cls(request.scope, request.receive)