Balatro-Multiplayer / Balatro-Multiplayer/BalatroMultiplayerAPI-Server

Dev impersonation requires pre-seeded accounts — create unknown names on demand

未关闭
#37 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
13
派生
20
平均合并
3 天 7 小时
30 天内合并 PR
7

描述

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

贡献指南

这个仓库没有索引到贡献指南

调研方向

查找 POST /api/auth/dev/impersonate handler 及其 player lookup,然后检查 seed-speedrun-players.ts 以了解 player fields 和 login behavior。完成的标准是:未知的 steamName 会在预先接受 ToS 的情况下被创建并登录,而缺少 playerId 时仍返回 404;通过 development endpoint 验证这两条路径。

由索引模型根据 Issue 内容生成。

评估

技术栈
typescript
领域
api, authentication, backend
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
描述清楚
新手友好度
72/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。