add get flash list

This commit is contained in:
2023-12-27 20:54:53 -06:00
parent 75576f96ce
commit d277d14da7
3 changed files with 21 additions and 1 deletions

17
app/routers/flash.py Normal file
View File

@@ -0,0 +1,17 @@
import os
from fastapi import APIRouter
import json
router = APIRouter()
@router.get("/get-flash-files")
async def get_flash_files():
# Flash files directory
FLASH_DIR = os.getenv('FLASH_DIR')
files_list = os.listdir(FLASH_DIR)
return {"files":files_list}