mirror of
https://github.com/etesync/server
synced 2024-11-19 07:18:08 +00:00
Type fix.
This commit is contained in:
parent
49eeeefef5
commit
0d9c9f153d
@ -61,6 +61,7 @@ class MsgpackRoute(APIRoute):
|
|||||||
def get_route_handler(self) -> t.Callable:
|
def get_route_handler(self) -> t.Callable:
|
||||||
async def custom_route_handler(request: Request) -> Response:
|
async def custom_route_handler(request: Request) -> Response:
|
||||||
content_type = request.headers.get("Content-Type")
|
content_type = request.headers.get("Content-Type")
|
||||||
|
if content_type is not None:
|
||||||
try:
|
try:
|
||||||
request_cls = self.REQUESTS_CLASSES[content_type]
|
request_cls = self.REQUESTS_CLASSES[content_type]
|
||||||
request = request_cls(request.scope, request.receive)
|
request = request_cls(request.scope, request.receive)
|
||||||
|
Loading…
Reference in New Issue
Block a user