From 474c1cae7e12e2dd0853cd49f30f35a5bc4f30ce Mon Sep 17 00:00:00 2001 From: Backend IM Bot Date: Fri, 28 Mar 2025 17:00:40 +0000 Subject: [PATCH] Update code in endpoints/chy.get.py --- endpoints/chy.get.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/endpoints/chy.get.py b/endpoints/chy.get.py index 5fa62a1..bb4eb9a 100644 --- a/endpoints/chy.get.py +++ b/endpoints/chy.get.py @@ -1,9 +1,16 @@ 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.get("/chy", status_code=200, response_model=Dict[str, str]) -async def get_yolo(): - """Return yolo""" - return {"message": "yolo"} \ No newline at end of file +@router.get("/chy", status_code=200, response_model=ChySchema) +async def get_chy_message( + db: Session = Depends(get_db) +): + message = get_chy_message(db) + return {"message": "yoloo max"} \ No newline at end of file