From f8f036071e5e079549261bb082039de16640d02a Mon Sep 17 00:00:00 2001 From: Backend IM Bot Date: Sat, 29 Mar 2025 21:17:34 +0000 Subject: [PATCH] Update code in endpoints/months.get.py --- endpoints/months.get.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/endpoints/months.get.py b/endpoints/months.get.py index e69de29..89bdb76 100644 --- a/endpoints/months.get.py +++ b/endpoints/months.get.py @@ -0,0 +1,15 @@ +from fastapi import APIRouter, status +from typing import Dict +import random + +router = APIRouter() + +@router.get("/months", status_code=status.HTTP_200_OK, response_model=Dict[str, str]) +async def get_random_month(): + months = [ + "January", "February", "March", "April", + "May", "June", "July", "August", + "September", "October", "November", "December" + ] + random_month = random.choice(months) + return {"month": random_month} \ No newline at end of file