update routes.ts
This commit is contained in:
		
							parent
							
								
									527ac8ac54
								
							
						
					
					
						commit
						377f8c1020
					
				| 
						 | 
				
			
			@ -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}`);
 | 
			
		||||
    }
 | 
			
		||||
  );
 | 
			
		||||
});
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue