INNER CODE UNIT · Python
get_session
Marven11/EtherGhost · ether_ghost/main.py:174
async def get_session(session_id: UUID):
session: t.Union[session_types.SessionInfo, None] = (
session_manager.get_session_info_by_id(session_id)
)
if not session:
raise core.UserError("没有这个session")
return session
@app.get("/", dependencies=[Depends(require_auth)])
async def hello_world():
"""转到主页"""
return RedirectResponse("/public/index.html")