18 lines
555 B
Python
18 lines
555 B
Python
# Entity: People
|
|
|
|
from fastapi import APIRouter, Depends, HTTPException, status
|
|
from typing import List
|
|
from core.database import get_db
|
|
from sqlalchemy.orm import Session
|
|
from models.people import People
|
|
from schemas.people import PeopleSchema
|
|
from helpers.people_helpers import delete_people_below_50
|
|
|
|
router = APIRouter()
|
|
|
|
@router.delete("/peoples", status_code=200)
|
|
async def delete_peoples_below_50_years_old(
|
|
db: Session = Depends(get_db)
|
|
):
|
|
delete_people_below_50(db)
|
|
return {"message": "People below 50 years old deleted successfully"} |