Files
DianZhanDemo/server/config/feishu-config.ts

28 lines
980 B
TypeScript
Raw Permalink Normal View History

2025-12-11 02:09:07 +08:00
/**
*
*
*/
export const FEISHU_CONFIG = {
// 默认应用配置 - 从环境变量获取
DEFAULT_APP_TOKEN: process.env.FEISHU_DEFAULT_APP_TOKEN || 'YDtMbwqBkangyistqmicDAH0nag',
DEFAULT_TABLE_ID: process.env.FEISHU_DEFAULT_TABLE_ID || 'tblGRc1MSmQfonb2',
// 应用凭证 - 从环境变量获取
APP_ID: process.env.FEISHU_APP_ID || '',
APP_SECRET: process.env.FEISHU_APP_SECRET || '',
}
/**
*
* @param tableId ID使
* @returns app_token完全从服务端获取
*/
export function getFeishuConfig(tableId?: string) {
return {
appToken: FEISHU_CONFIG.DEFAULT_APP_TOKEN, // app_token完全从服务端配置获取不从前端传递
tableId: tableId || FEISHU_CONFIG.DEFAULT_TABLE_ID,
appId: FEISHU_CONFIG.APP_ID,
appSecret: FEISHU_CONFIG.APP_SECRET,
}
}