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

Đang mở
#2,003 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
72/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
typescript
Lĩnh vực
api, backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
HTML
Star
33
Fork
107
Merge trung bình
14 giờ 6 phút
Pull request đã merge (30 ngày)
19

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của USRSE/usrse.github.io

Tất cả issue của USRSE/usrse.github.io

Issue tương tự

Thêm issue về Backend & API Design

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.