add cork to middleware with mixed async and sync

pull/39/head
Ciro 2022-11-15 09:16:26 -03:00
rodzic 7ed7325d25
commit 6536c6a63b
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -52,7 +52,7 @@ def another_middie(res, req, data=None):
return data
def home(res, req, user=None):
res.end(user.get('greeting', None))
res.cork_end(user.get('greeting', None))
app = App()
app.get("/", middleware(auth, another_middie, home))