mirror of
https://github.com/etesync/server
synced 2024-10-31 20:58:54 +00:00
Msgpack handling: fix compatibilty with newer fastapi.
Fixes #112. Supersedes #127.
This commit is contained in:
parent
247c5ea680
commit
f62d4ebdfc
@ -12,7 +12,7 @@ from .db_hack import django_db_cleanup_decorator
|
|||||||
class MsgpackRequest(Request):
|
class MsgpackRequest(Request):
|
||||||
media_type = "application/msgpack"
|
media_type = "application/msgpack"
|
||||||
|
|
||||||
async def json(self) -> bytes:
|
async def body(self) -> bytes:
|
||||||
if not hasattr(self, "_json"):
|
if not hasattr(self, "_json"):
|
||||||
body = await super().body()
|
body = await super().body()
|
||||||
self._json = msgpack_decode(body)
|
self._json = msgpack_decode(body)
|
||||||
|
Loading…
Reference in New Issue
Block a user