mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
server: fixes get_all
This commit is contained in:
@@ -134,9 +134,7 @@ class Transcript(BaseModel):
|
||||
|
||||
class TranscriptController:
|
||||
async def get_all(self, user_id: str | None = None) -> list[Transcript]:
|
||||
query = transcripts.select()
|
||||
if user_id is not None:
|
||||
query = query.where(transcripts.c.user_id == user_id)
|
||||
query = transcripts.select().where(transcripts.c.user_id == user_id)
|
||||
results = await database.fetch_all(query)
|
||||
return results
|
||||
|
||||
|
||||
Reference in New Issue
Block a user