From badeb5d57e365ce0099bcf318c2c5d8ca485c790 Mon Sep 17 00:00:00 2001 From: Backend IM Bot Date: Sat, 12 Apr 2025 21:31:39 +0000 Subject: [PATCH] feat: Updated endpoint endpoints/names.post.py via AI --- endpoints/names.post.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/endpoints/names.post.py b/endpoints/names.post.py index e06bee9..a93e836 100644 --- a/endpoints/names.post.py +++ b/endpoints/names.post.py @@ -1,12 +1,11 @@ -from fastapi import APIRouter +from fastapi import APIRouter, status from typing import List -from schemas.fruit import FruitNamesResponse from helpers.fruit_helpers import get_all_fruit_names router = APIRouter() -@router.post("/names", response_model=List[FruitNamesResponse]) -async def get_fruit_names(): +@router.post("/names", status_code=status.HTTP_200_OK, response_model=List[str]) +async def get_names(): """Return all fruit names""" fruit_names = get_all_fruit_names() return fruit_names \ No newline at end of file