mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
tweak(platform): Limit templates to users (#8271)
limit templates to users Co-authored-by: Aarushi <50577581+aarushik93@users.noreply.github.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
@classmethod
|
||||
async def get_graph(
|
||||
|
||||
Reference in New Issue
Block a user