Update code in endpoints\lagacy.get.py
This commit is contained in:
parent
a23367a5fb
commit
3d315945ea
@ -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
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user