diff --git a/endpoints/glory.get.py b/endpoints/glory.get.py index e69de29..0eb670b 100644 --- a/endpoints/glory.get.py +++ b/endpoints/glory.get.py @@ -0,0 +1,21 @@ +# Entity: Glory + +```python +from fastapi import APIRouter, Depends, HTTPException, status +from sqlalchemy.orm import Session +from typing import List +from core.database import get_db +from models.glory import Glory +from schemas.glory import GlorySchema +from helpers.glory_helpers import get_all_glory_records + +router = APIRouter() + +@router.get("/glory", response_model=List[GlorySchema], status_code=200) +async def get_glory_records( + db: Session = Depends(get_db) +): + """Get all glory records""" + glory_records = get_all_glory_records(db) + return glory_records +``` \ No newline at end of file