(websocket: WebSocket, additional: str)
| 174 | @ws_inject_decorator(additional="payload") |
| 175 | @requires("authenticated") |
| 176 | async def websocket_endpoint_decorated(websocket: WebSocket, additional: str) -> None: |
| 177 | await websocket.accept() |
| 178 | await websocket.send_json( |
| 179 | { |
| 180 | "authenticated": websocket.user.is_authenticated, |
| 181 | "user": websocket.user.display_name, |
| 182 | "additional": additional, |
| 183 | } |
| 184 | ) |
| 185 | |
| 186 | |
| 187 | app = Starlette( |