add response_validation_exception_handler

This commit is contained in:
grillazz
2025-08-23 20:04:23 +02:00
parent 8312f06c0b
commit e2f01f89c5
6 changed files with 62 additions and 34 deletions

View File

@@ -22,11 +22,12 @@ async def create_nonsense(
@router.get("/", response_model=NonsenseResponse)
async def find_nonsense(
async def get_nonsense(
name: str,
db_session: AsyncSession = Depends(get_db),
):
return await Nonsense.find(db_session, name)
nonsense = await Nonsense.get_by_name(db_session, name)
return nonsense
@router.delete("/")