add webhook gitea

This commit is contained in:
joseph le 2023-09-20 13:26:29 +07:00
parent bdd91a3685
commit bcd36779e4
1 changed files with 11 additions and 11 deletions

View File

@ -213,16 +213,16 @@ router.post("/api/gitea-webhook", ( req, res ) => {
// } // }
console.log("New event ---> ", req.body); console.log("New event ---> ", req.body);
// exec( exec(
// Env.get("URL_FILE_SHELL"), "/home/giteaHook.sh",
// (error, stdout, stderr) => { (error, stdout, stderr) => {
// if (error) { if (error) {
// console.error(`Error executing command: ${error}`); console.log(`Error executing command: ${error}`);
// return; res.status(500).send("PULL ERROR")
// } }
res.status(200).send({mess: "PULL SUCCESS!", data: stdout})
// console.log(`Command output:\n${stdout}`); console.log(`Command output:\n${stdout}`);
// } }
// ); );
}); });
module.exports = router; module.exports = router;