add webpage info

This commit is contained in:
ipu 2025-09-03 22:42:24 +03:00
parent e4d2e64ce7
commit 959fd1ac86
5 changed files with 83 additions and 8 deletions

9
src/cache/page_cache.py vendored Normal file
View file

@ -0,0 +1,9 @@
from src.database import Session, Webpage
async def get_page_description(page_id: str) -> str | None:
with Session() as session:
page = session.query(Webpage).filter(Webpage.id == page_id).first()
if not page:
return None
return page.description