from fastapi import FastAPI from src.classes import product_classes from src import data_connection app = FastAPI() @app.get("/") def read_root(): return {"Hello": "World"} @app.get("/products", response_model=list[product_classes.Product]) def get_all_products(): return data_connection.get_all_products() # @app.get("/boardgames/{boardgame_id}", response_model=boardgame_classes.BoardGame) # def get_boardgame_by_id(boardgame_id: int): # requested_boardgame: boardgame_classes.BoardGame = data_connection.get_boardgame(boardgame_id) # return requested_boardgame