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:
Swifty
2024-10-07 12:08:51 +02:00
committed by GitHub
parent daa054c79c
commit fd9968683c

View File

@@ -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(