feat: add annotations, user profiles, watchers, stories, search and more
This commit is contained in:
1 parent
ed469ba8dd
commit
2465bcd184
47 files changed
+5009
-242
No files matched your search
@@ -68,3 +68,17 @@ async def get_stories(
|
||||
*params,
|
||||
)
|
||||
return [StoryView(**dict(row)) for row in rows]
|
||||
|
||||
|
||||
async def get_story(
|
||||
pool: asyncpg.Pool, account_id: int, peer_id: int, story_id: int
|
||||
) -> StoryView | None:
|
||||
row = await pool.fetchrow(
|
||||
"SELECT peer_id, story_id, date, expire_date, caption, media_kind, "
|
||||
"storage_key, downloaded, views, pinned, deleted FROM stories "
|
||||
"WHERE account_id = $1 AND peer_id = $2 AND story_id = $3",
|
||||
account_id,
|
||||
peer_id,
|
||||
story_id,
|
||||
)
|
||||
return StoryView(**dict(row)) if row else None
|
||||
Reference in new issue
Block a user