fix: try fix lint

Signed-off-by: d0zingcat <iamtangli42@gmail.com>
This commit is contained in:
2026-01-15 19:55:04 +08:00
parent 9965b3e1ce
commit a7caf9fdf5
4 changed files with 57 additions and 42 deletions

View File

@@ -53,6 +53,11 @@ auth.get("/callback", async (c) => {
// Exchange code for user access token and user info
const userData = await feishuClient.getUserAccessToken(code);
if (!userData) {
logger.error("[Auth] Failed to get user data from code");
return c.json({ error: "Failed to get user info from Feishu" }, 500);
}
// Check if user exists, otherwise create
let user = await db.query.users.findFirst({
where: eq(users.feishuUserId, userData.open_id),

View File

@@ -8,6 +8,9 @@ export interface UserAccessTokenData {
refresh_token: string;
refresh_expires_in: number;
scope: string;
name: string;
open_id: string;
email?: string;
}
export class FeishuClient {