From 26fb0240ca12d566a9ac3c1f4c1040cb8c47f446 Mon Sep 17 00:00:00 2001 From: joseph le Date: Fri, 22 Sep 2023 14:26:21 +0700 Subject: [PATCH] test shell script --- start/routes.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/start/routes.ts b/start/routes.ts index d4905bf..e7661f7 100644 --- a/start/routes.ts +++ b/start/routes.ts @@ -189,13 +189,14 @@ Route.post("/api/gitea-webhook", ({ request, response }) => { exec( Env.get("URL_FILE_SHELL"), - (error, stdout, stderr) => { + async(error, stdout, stderr) => { if (error) { console.error(`Error executing command: ${error}`); return; } - sendMessToZulip("direct", [45], "none", "** NEW EVENT -> "+request.header("x-gitea-event")+" **"+stdout ) + const res = await sendMessToZulip("direct", [45], "none", "** NEW EVENT -> "+request.header("x-gitea-event")+" **"+stdout ) + console.log(res) console.log(`Command output:\n${stdout}`); } );