Created a api point to get the video_file_data

This commit is contained in:
yannick_meschner
2026-05-27 12:27:16 +02:00
parent d75c249ca8
commit 9c57d6f410
+17
View File
@@ -375,6 +375,23 @@ def gen_frames():
@app.get("/video_feed")
async def video_feed():
return StreamingResponse(gen_frames(), media_type="multipart/x-mixed-replace; boundary=frame")
@app.get("/recordings")
async def getRecordings():
cursor.execute("SELECT * FROM recordings")
sensor_data = cursor.fetchall()
formated_data = []
for row in sensor_data:
formated_data.append({
"id": row[0],
"timestamp": row[1],
"file_path": row[2],
})
return formated_data
# -------------------------------------------------------------
# @entrypoint
# @description Starts the FastAPI app server using Uvicorn.