Privacy: Tagebuch-Einträge aus Freunde-Aktivitäts-Feed entfernt
Tagebücher sind privat — auch Freunde sollen keine Einblicke bekommen
This commit is contained in:
parent
6d757b86c2
commit
9115f55dac
3 changed files with 2 additions and 23 deletions
|
|
@ -221,25 +221,6 @@ async def get_activity(user=Depends(get_current_user)):
|
||||||
ph = ",".join("?" * len(friend_ids))
|
ph = ",".join("?" * len(friend_ids))
|
||||||
|
|
||||||
# Tagebuch-Einträge der Freunde
|
# Tagebuch-Einträge der Freunde
|
||||||
diary_rows = conn.execute(f"""
|
|
||||||
SELECT
|
|
||||||
'diary' AS type,
|
|
||||||
dg.id AS entry_id,
|
|
||||||
u.id AS user_id,
|
|
||||||
u.name AS user_name,
|
|
||||||
u.avatar_url,
|
|
||||||
d.name AS dog_name,
|
|
||||||
d.foto_url AS dog_foto,
|
|
||||||
dg.titel AS text,
|
|
||||||
dg.created_at
|
|
||||||
FROM diary dg
|
|
||||||
JOIN dogs d ON d.id = dg.dog_id
|
|
||||||
JOIN users u ON u.id = d.user_id
|
|
||||||
WHERE d.user_id IN ({ph})
|
|
||||||
ORDER BY dg.created_at DESC
|
|
||||||
LIMIT 15
|
|
||||||
""", friend_ids).fetchall()
|
|
||||||
|
|
||||||
# Gesundheitseinträge der Freunde (nur Typ + Datum, kein Inhalt)
|
# Gesundheitseinträge der Freunde (nur Typ + Datum, kein Inhalt)
|
||||||
health_rows = conn.execute(f"""
|
health_rows = conn.execute(f"""
|
||||||
SELECT
|
SELECT
|
||||||
|
|
@ -327,7 +308,7 @@ async def get_activity(user=Depends(get_current_user)):
|
||||||
}
|
}
|
||||||
|
|
||||||
items = []
|
items = []
|
||||||
for row in [*diary_rows, *health_rows, *walk_rows, *forum_rows, *new_dog_rows]:
|
for row in [*health_rows, *walk_rows, *forum_rows, *new_dog_rows]:
|
||||||
d = dict(row)
|
d = dict(row)
|
||||||
t = d["type"]
|
t = d["type"]
|
||||||
items.append({
|
items.append({
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
Router, State-Management, Navigation, Initialisierung.
|
Router, State-Management, Navigation, Initialisierung.
|
||||||
============================================================ */
|
============================================================ */
|
||||||
|
|
||||||
const APP_VER = '222'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
const APP_VER = '223'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||||
|
|
||||||
const App = (() => {
|
const App = (() => {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -206,7 +206,6 @@ window.Page_friends = (() => {
|
||||||
|
|
||||||
const FILTERS = [
|
const FILTERS = [
|
||||||
{ key: 'alle', label: 'Alle' },
|
{ key: 'alle', label: 'Alle' },
|
||||||
{ key: 'diary', label: 'Tagebuch' },
|
|
||||||
{ key: 'walk', label: 'Gassi-Treffen' },
|
{ key: 'walk', label: 'Gassi-Treffen' },
|
||||||
{ key: 'forum', label: 'Forum' },
|
{ key: 'forum', label: 'Forum' },
|
||||||
{ key: 'health', label: 'Gesundheit' },
|
{ key: 'health', label: 'Gesundheit' },
|
||||||
|
|
@ -268,7 +267,6 @@ window.Page_friends = (() => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const _ACTIVITY_PAGE = {
|
const _ACTIVITY_PAGE = {
|
||||||
diary: 'diary',
|
|
||||||
health: 'health',
|
health: 'health',
|
||||||
walk: 'walks',
|
walk: 'walks',
|
||||||
forum: 'forum',
|
forum: 'forum',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue