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

Aperta
#2,003 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
typescript
Ambito
api, backend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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).

Lingua principale
HTML
Stelle
33
Fork
107
Merge medio
14h 6m
PR unite (30g)
19

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di USRSE/usrse.github.io

Tutte le issue di USRSE/usrse.github.io

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.