Basic working, no db
This commit is contained in:
3
main.py
3
main.py
@@ -8,7 +8,7 @@ recorder = PooRecorder()
|
||||
|
||||
|
||||
@asynccontextmanager
|
||||
async def _lifespan(_app: FastAPI):
|
||||
async def _lifespan(_app: FastAPI): # noqa: ANN202
|
||||
await recorder.start()
|
||||
yield
|
||||
await recorder.stop()
|
||||
@@ -19,4 +19,5 @@ app = FastAPI(lifespan=_lifespan)
|
||||
|
||||
@app.put("/record/s={status}")
|
||||
async def record(status: str) -> dict:
|
||||
await recorder.record(status)
|
||||
return {"status": status}
|
||||
|
||||
Reference in New Issue
Block a user