mirror of
https://github.com/samuelcolvin/FastUI.git
synced 2023-12-01 22:22:11 +03:00
api 404
This commit is contained in:
@@ -248,3 +248,9 @@ async def sse_generator() -> AsyncIterable[str]:
|
||||
@router.get('/sse')
|
||||
async def sse_experiment() -> StreamingResponse:
|
||||
return StreamingResponse(sse_generator(), media_type='text/event-stream')
|
||||
|
||||
|
||||
@router.get('/{path:path}')
|
||||
async def api_404():
|
||||
# so we don't fall through to the index page
|
||||
return {'message': 'Not Found'}
|
||||
|
||||
Reference in New Issue
Block a user