test shell script

This commit is contained in:
joseph le 2023-09-22 14:26:21 +07:00
parent 670046e3a3
commit 26fb0240ca
1 changed files with 3 additions and 2 deletions

View File

@ -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}`);
}
);