明树Git Lab

Commit 036798a4 authored by zfp1's avatar zfp1

3

parent 916525f9
......@@ -7,7 +7,7 @@ const app = express();
// 初始化DeepSeek客户端 [3]()
const deepseek = new OpenAI({
baseURL: 'https://api.deepseek.com/v1',
apiKey: DEEPSEEK_API_KEY,
apiKey: process.env.DEEPSEEK_API_KEY,
});
// 微信消息处理器
......@@ -16,7 +16,7 @@ app.post('/wechat', async (req, res) => {
// 1. 验证签名
const { signature, timestamp, nonce } = req.query;
const sha1 = crypto.createHash('sha1');
const arr = [WECHAT_TOKEN, timestamp, nonce].sort();
const arr = [process.env.WECHAT_TOKEN, timestamp, nonce].sort();
const sign = sha1.update(arr.join('')).digest('hex');
if (signature !== sign) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment