AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
tweak(platform): Limit templates to users (#8271)
Swiftyfd9968683c40
diff --git a/autogpt_platform/backend/backend/server/rest_api.py b/autogpt_platform/backend/backend/server/rest_api.pyindex f63fe3406f..4378cfb50a 100644--- a/autogpt_platform/backend/backend/server/rest_api.py+++ b/autogpt_platform/backend/backend/server/rest_api.py@@ -344,8 +344,10 @@ class AgentServer(AppService):)@classmethod- async def get_templates(cls) -> list[graph_db.GraphMeta]:- return await graph_db.get_graphs_meta(filter_by="template")+ async def get_templates(+ cls, user_id: Annotated[str, Depends(get_user_id)]+ ) -> list[graph_db.GraphMeta]:+ return await graph_db.get_graphs_meta(filter_by="template", user_id=user_id)@classmethodasync def get_graph(