From 218f91034bd942422f2763c76ed24eb1c7d3aac9 Mon Sep 17 00:00:00 2001 From: pan <1029559041@qq.com> Date: Sat, 10 Oct 2020 16:41:02 +0800 Subject: [PATCH] token --- routes/index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/routes/index.js b/routes/index.js index c9f0819..d3dc25e 100644 --- a/routes/index.js +++ b/routes/index.js @@ -26,16 +26,15 @@ function dingding(message){ const url=`https://oapi.dingtalk.com/robot/send?access_token=${access_token}` info(url) fetch(url,{ - method:'POST', headers:{ 'Content-Type':'application/json' }, - body:{ + body:JSON.stringify({ msgtype:'text', text:{ content:message } - } + }) }).then(res=>res.json()).then(res=>info(`钉钉推送结果:${JSON.stringify(res ,null, 2)}`)).catch(err=>error(err)) } //记录开始部署的时间