From 452634a5ba655a78d9c94294cb33e501856d974b Mon Sep 17 00:00:00 2001 From: pan <1029559041@qq.com> Date: Sun, 11 Oct 2020 02:26:17 +0800 Subject: [PATCH] token --- routes/index.js | 5 ++++- views/deploy.pug | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 views/deploy.pug diff --git a/routes/index.js b/routes/index.js index 66b7847..5b9b735 100644 --- a/routes/index.js +++ b/routes/index.js @@ -91,7 +91,10 @@ router.post('/deploy', function(req, res, next) { //部署完毕事件 router.get('/finsh', function(req, res, next) { - dingding(`${req.query.name}|${startDeploy[req.query.name].description}自动部署成功,花费时间:${moment().diff(startDeploy[req.query.name].startTime,'seconds',true)}秒`) + if(req.query.name in startDeploy) { + let deployInfo=startDeploy[req.query.name] + dingding(`${req.query.name}|${deployInfo.description}自动部署成功,花费时间:${moment().diff(deployInfo.startTime, 'seconds', true)}秒`) + } res.json({message:`仓库代码${req.query.name}部署成功`}) }); diff --git a/views/deploy.pug b/views/deploy.pug new file mode 100644 index 0000000..22442af --- /dev/null +++ b/views/deploy.pug @@ -0,0 +1,4 @@ +extends layout + +block content + h1= message \ No newline at end of file