From 83d54b712365db394abcd40055b138d237d4cacc Mon Sep 17 00:00:00 2001 From: Backend IM Bot Date: Sun, 23 Mar 2025 21:09:58 +0000 Subject: [PATCH] Update code in endpoints/movies.get.py --- endpoints/movies.get.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/endpoints/movies.get.py b/endpoints/movies.get.py index e69de29..6c0c9eb 100644 --- a/endpoints/movies.get.py +++ b/endpoints/movies.get.py @@ -0,0 +1,27 @@ +from fastapi import APIRouter, HTTPException + +movies = [ + { + "title": "The Matrix", + "genre": "Sci-Fi", + "director": "Wachowski Sisters" + }, + { + "title": "Inception", + "genre": "Action", + "director": "Christopher Nolan" + } +] + +router = APIRouter() + +@router.get("/movies") +async def get_movies(): + """Demo movies endpoint""" + return { + "message": "Movies retrieved successfully", + "method": "GET", + "_verb": "get", + "movies": movies, + "count": len(movies) + } \ No newline at end of file