Initial LinkLog implementation

This commit is contained in:
Olaf
2026-08-24 14:30:30 +02:00
commit 1c827956c4
50 changed files with 3436 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
from fastapi import APIRouter
from backend.app.services.link_service import list_public_links
router = APIRouter()
@router.get('/feed')
@router.get('/feed/{username}')
def public_feed(username: str | None = None):
items = list_public_links(username)
return [
{
'id': item['id'],
'title': item['title'],
'url': item['url'],
'comment': item['comment'],
'user': {
'username': item['username'],
'avatar_url': item['avatar_url'],
'bio': item['bio'],
},
'created_at': item['created_at'],
}
for item in items
]