fix(users): add target round and role payload to user upgrade endpoint

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

@Rithish-2914 đang làm issue này rồi.

Từ ngày 18/9/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

enhancement
Problem

The Admin Portal cannot advance users to Round 2 or Round 3 because upgradeUserToRound() in src/api/users.ts sends an empty body {} to POST /admin/users/:id/upgrade.
The backend controller requires dto.UpgradeUserRequest with round_qualified / role in the request body to execute the qualification update.

Steps to Reproduce
  1. In the admin panel, trigger a user upgrade/promotion for a participant.
  2. Network tab inspects POST /admin/users/:id/upgrade sending {} (empty payload).
  3. Observed Behavior: The backend cannot determine which round to qualify the user for.
  4. Expected Behavior: Admins should be able to promote users to Round 2 or Round 3 by passing { round_qualified: 2 } or { round_qualified: 3 } in the request body.
Proposed solution
  1. Update upgradeUserToRound(id, payload) in src/api/users.ts to accept UpgradeUserPayload { round_qualified?: number, role?: string }.
  2. Update SetUserRound to pass the target round when bulk promoting.
Alternatives considered

No response

Ngôn ngữ chính
TypeScript
Star
0
Fork
1
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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 CodeChefVIT/cookoff-admin-11.0

Tất cả issue của CodeChefVIT/cookoff-admin-11.0

Issue tương tự

Thêm issue về TypeScript

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.