From b75e0daaf09d02ceae8b2ab4ed30ad366929d039 Mon Sep 17 00:00:00 2001 From: maojindao55 Date: Fri, 28 Mar 2025 08:47:45 +0800 Subject: [PATCH] fix login bug --- functions/api/login.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/functions/api/login.ts b/functions/api/login.ts index b213faf..a5ced7b 100644 --- a/functions/api/login.ts +++ b/functions/api/login.ts @@ -97,6 +97,8 @@ export const onRequestPost: PagesFunction = async (context) => { WHERE phone = ? `).bind(phone).first(); + userId = userInfo.id + // 生成 token const token = await generateToken(userId, env);