update routes.ts

This commit is contained in:
joseph le 2023-09-13 15:49:23 +07:00
parent 527ac8ac54
commit 377f8c1020
1 changed files with 10 additions and 13 deletions

View File

@ -192,20 +192,17 @@ Route.post("/api/gitea-webhook", ({ request, response }) => {
// console.log('Received push event from GitLab:');
// console.log(JSON.stringify(eventData, null, 2));
// }
console.log(request.headers());
console.log(request.all());
console.log("first3215423");
console.log("New event ---> ", request.header("x-gitea-event"));
// exec(
// "/home/joseph/adonis-gitlab-webhook/gitea.sh",
// (error, stdout, stderr) => {
// if (error) {
// console.error(`Error executing command: ${error}`);
// return;
// }
exec(
Env.get("URL_FILE_SHELL"),
(error, stdout, stderr) => {
if (error) {
console.error(`Error executing command: ${error}`);
return;
}
// console.log(`Command output:\n${stdout}`);
// }
// );
console.log(`Command output:\n${stdout}`);
}
);
});