fix: 修复滑完后卡在等待状态的问题

- findBestMatch 不再返回 null,无人 like 时按评分兜底推荐
- 移除即时匹配的 users.length > 1 限制,支持单人房间
This commit is contained in:
2026-02-24 17:30:59 +08:00
parent e2c3b869eb
commit a72f7ed884
2 changed files with 8 additions and 15 deletions
+1 -4
View File
@@ -28,10 +28,7 @@ export async function POST(
data.likes[rid].push(userId);
}
if (
data.users.length > 1 &&
data.likes[rid].length === data.users.length
) {
if (data.likes[rid].length === data.users.length) {
data.match = rid;
}
}