New Entry page improvements on link detection

This commit is contained in:
2026-08-28 09:04:24 +02:00
parent cf83c32b25
commit 50d61371e1
8 changed files with 159 additions and 37 deletions
+13
View File
@@ -123,6 +123,19 @@ def find_owned_link_by_title_url(user_id: str, title: str, url: str) -> dict | N
return record
def find_owned_link_by_title(user_id: str, title: str) -> dict | None:
with get_connection() as conn:
row = conn.execute(
'SELECT * FROM links WHERE user_id = ? AND title = ? ORDER BY created_at DESC LIMIT 1',
(user_id, title),
).fetchone()
if row is None:
return None
record = dict(row)
record['tags'] = get_link_tags(conn, record['id'])
return record
def list_public_links(username: str | None = None):
with get_connection() as conn:
rows = conn.execute(