From 95221e2b1df2c8dbb75e9779422d0d29306b35a1 Mon Sep 17 00:00:00 2001 From: hanhh <18330117883@163.com> Date: Sun, 13 Jun 2021 18:45:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9B=B4=E6=96=B0=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E5=8F=82=E6=95=B0=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/api/cron.ts | 5 ++++- shell/api.sh | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/back/api/cron.ts b/back/api/cron.ts index 63436808..5206c6b6 100644 --- a/back/api/cron.ts +++ b/back/api/cron.ts @@ -238,7 +238,10 @@ export default (app: Router) => { const logger: Logger = Container.get('logger'); try { const cronService = Container.get(CronService); - const data = await cronService.status(req.body); + const data = await cronService.status({ + ...req.body, + status: parseInt(req.body.status), + }); return res.send({ code: 200, data }); } catch (e) { logger.error('🔥 error: %o', e); diff --git a/shell/api.sh b/shell/api.sh index c58242b8..d2c1d410 100755 --- a/shell/api.sh +++ b/shell/api.sh @@ -168,9 +168,9 @@ update_cron_status() { code=$(echo $api | jq -r .code) message=$(echo $api | jq -r .message) if [[ $code == 200 ]]; then - echo -e "成功" + echo -e "更新任务状态成功" else - echo -e "失败(${message})" + echo -e "更新任务状态失败(${message})" fi }