Update code in endpoints/chy.get.py

This commit is contained in:
Backend IM Bot 2025-03-28 17:00:40 +00:00
parent f1ceb96c6e
commit 474c1cae7e

View File

@ -1,9 +1,16 @@
from fastapi import APIRouter, Depends, HTTPException, status from fastapi import APIRouter, Depends, HTTPException, status
from typing import Dict from sqlalchemy.orm import Session
from typing import List
from core.database import get_db
from models.chy import Chy
from schemas.chy import ChySchema
from helpers.chy_helpers import get_chy_message
router = APIRouter() router = APIRouter()
@router.get("/chy", status_code=200, response_model=Dict[str, str]) @router.get("/chy", status_code=200, response_model=ChySchema)
async def get_yolo(): async def get_chy_message(
"""Return yolo""" db: Session = Depends(get_db)
return {"message": "yolo"} ):
message = get_chy_message(db)
return {"message": "yoloo max"}