diff --git a/endpoints/footing.post.py b/endpoints/footing.post.py index 18eb06e..575a9cf 100644 --- a/endpoints/footing.post.py +++ b/endpoints/footing.post.py @@ -1,4 +1,3 @@ -```python from fastapi import APIRouter, HTTPException import uuid @@ -9,7 +8,6 @@ router = APIRouter() @router.post("/footing") async def save_game( title: str, - description: str, genre: str, platform: str ): @@ -18,13 +16,13 @@ async def save_game( raise HTTPException(status_code=405, detail="Method Not Allowed") game_id = str(uuid.uuid4()) - games.append({ + game = { "id": game_id, "title": title, - "description": description, - "genre": genre, + "genre": genre, "platform": platform - }) + } + games.append(game) return { "method": "POST", @@ -38,10 +36,9 @@ async def get_games(): """Fetch all saved games from the database""" if request.method != "GET": raise HTTPException(status_code=405, detail="Method Not Allowed") - + return { - "method": "GET", - "_verb": "get", + "method": "GET", + "_verb": "get", "games": games - } -``` \ No newline at end of file + } \ No newline at end of file