Update code in endpoints\lagacy.get.py

This commit is contained in:
Backend IM Bot 2025-03-22 23:14:15 +01:00
parent a23367a5fb
commit 3d315945ea

View File

@ -0,0 +1,28 @@
from fastapi import APIRouter, HTTPException
router = APIRouter()
legacy_auth_files = [
{
"id": "abc123",
"name": "auth_file_1.txt",
"content": "legacy auth data..."
},
{
"id": "def456",
"name": "auth_file_2.csv",
"content": "more legacy auth data..."
}
]
@router.get("/legacy")
async def retrieve_legacy_auth_files():
"""retrieve lagacy auth files"""
if not request.method == "GET":
raise HTTPException(status_code=405, detail="Method Not Allowed")
return {
"method": "GET",
"_verb": "get",
"legacy_auth_files": legacy_auth_files
}