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

Aperta
#22 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@Rithish-2914 ci sta già lavorando.

Dal 18/9/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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

Lingua principale
TypeScript
Stelle
0
Fork
1
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

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

Tutte le issue di CodeChefVIT/cookoff-admin-11.0

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.