feat(api): use profiles.displayName instead of email in admin review/comment joins

Offen
#2,003 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
72/100
Issue-Typ
Feature
Klarheit
Klar beschrieben
Aktivitätsstatus
Ruhig
Tech-Stack
typescript
Bereich
api, backend

Rechercherichtung

Start with packages/api/src/routes/admin/events/byId.ts and packages/api/src/routes/admin/announcements/byId.ts, tracing how reviewerName and authorName are currently resolved. Update the joins to use profiles.displayName through profiles.userId = users.id, with email as the null fallback, and ensure the admin detail pages render those fields directly. Done means both admin detail routes provide the expected names without UI changes.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Summary

Admin detail pages (events + announcements) currently join users.email to surface reviewer / comment-author identity. Display name is the right field for human-readable attribution; fall back to email only when display name is null.

Requirements

  • Resolve reviewer/author display name from profiles.displayName (joined on profiles.userId = users.id) in:
    • packages/api/src/routes/admin/events/byId.ts
    • packages/api/src/routes/admin/announcements/byId.ts
  • Fall back to email when displayName is null
  • Update admin detail pages to render reviewerName / authorName directly (no UI changes expected since fields are already optional)

Context

Flagged in the Plan 3 review. Audit panel and review history will also benefit (same pattern).

Vorherrschende Sprache
HTML
Sterne
33
Forks
107
Ø Merge
14 Std. 6 Min.
Gemergte PRs (30 T.)
19

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus USRSE/usrse.github.io

Alle Issues in USRSE/usrse.github.io

Ähnliche Issues

Weitere Issues zu Backend & API Design

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.