diff --git a/endpoints/footing.post.py b/endpoints/footing.post.py index 61523a1..3660bee 100644 --- a/endpoints/footing.post.py +++ b/endpoints/footing.post.py @@ -8,20 +8,20 @@ router = APIRouter() @router.post("/footing") async def save_game( - game_name: str, + name: str, description: str, - developer: str + category: str ): """Save a new game to the database""" if request.method != "POST": raise HTTPException(status_code=405, detail="Method Not Allowed") - + game_id = str(uuid.uuid4()) game = { "id": game_id, - "name": game_name, - "description": description, - "developer": developer + "name": name, + "description": description, + "category": category } games.append(game) @@ -34,12 +34,12 @@ async def save_game( @router.get("/games") async def get_games(): - """Fetch all saved games""" + """Fetch all games from the database""" if request.method != "GET": raise HTTPException(status_code=405, detail="Method Not Allowed") return { - "method": "GET", + "method": "GET", "_verb": "get", "games": games }