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