kopia lustrzana https://github.com/cirospaciari/socketify.py
add cork to middleware with mixed async and sync
rodzic
7ed7325d25
commit
6536c6a63b
|
@ -52,7 +52,7 @@ def another_middie(res, req, data=None):
|
||||||
return data
|
return data
|
||||||
|
|
||||||
def home(res, req, user=None):
|
def home(res, req, user=None):
|
||||||
res.end(user.get('greeting', None))
|
res.cork_end(user.get('greeting', None))
|
||||||
|
|
||||||
app = App()
|
app = App()
|
||||||
app.get("/", middleware(auth, another_middie, home))
|
app.get("/", middleware(auth, another_middie, home))
|
||||||
|
|
Ładowanie…
Reference in New Issue