diff --git a/src/services/gameDistributionClient.ts b/src/services/gameDistributionClient.ts index 36e902ce3..dfb89898a 100644 --- a/src/services/gameDistributionClient.ts +++ b/src/services/gameDistributionClient.ts @@ -181,9 +181,11 @@ export async function getGame(gameId: string) { /** * 上报一次「开始游戏」。调用方按 fire-and-forget 处理:失败只静默忽略,绝不阻断进入游戏。 */ -export function recordGamePlay(gameId: string) { +export function recordGamePlay( + gameId: string, +): Promise<{ recorded?: boolean }> { const normalizedId = gameId.trim(); - if (!normalizedId) return Promise.resolve(); + if (!normalizedId) return Promise.resolve({ recorded: false }); return requestJson<{ recorded?: boolean }>( `/games/${encodeURIComponent(normalizedId)}/plays`, {