Balatro-Multiplayer / Balatro-Multiplayer/BalatroMultiplayerAPI-Server
Dev impersonation requires pre-seeded accounts — create unknown names on demand
- Ngôn ngữ chính
- TypeScript
- Star
- 13
- Fork
- 20
- Merge trung bình
- 3 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 7
Mô tả
**Status: enhancement**
## Current behavior
`POST /api/auth/dev/impersonate` (development-only) 404s when the requested `steamName` has no existing `players` row. Local multi-client testing therefore requires a seeding step first (e.g. `seed-speedrun-players.ts`) before any account can be impersonated.
## Proposal
On a `steamName` miss, create the player row on the fly (ToS pre-accepted so throwaway accounts skip the prompt) and log in as it — making local testing zero-setup: launch two clients, impersonate any two names, play. `playerId` (uuid) misses should still 404, since creating a row for a specific uuid is meaningless. The endpoint is already gated to `NODE_ENV=development`, so production exposure is unchanged.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Tìm handler POST /api/auth/dev/impersonate và phần tìm kiếm player của nó, sau đó kiểm tra seed-speedrun-players.ts để xem các trường của player và hành vi đăng nhập. Hoàn tất khi một steamName chưa biết được tạo với ToS đã được chấp nhận trước và được đăng nhập, trong khi thiếu playerId vẫn trả về 404; hãy xác minh cả hai đường đi thông qua development endpoint.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- typescript
- Lĩnh vực
- api, authentication, backend
- Loại issue
- Tính năng
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 72/100