vvv-sge23a/endpoints/glory.get.py
2025-03-27 21:25:45 +00:00

19 lines
560 B
Python

# Entity: Glory
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