add webhook gitea

This commit is contained in:
joseph le 2023-09-20 15:23:44 +07:00
parent ceab7ae08d
commit 122c7d7589
2 changed files with 1 additions and 4 deletions

View File

@ -208,7 +208,7 @@ router.post("/api/gitea-webhook", ( req, res ) => {
// console.log("New event ---> ", req.body);
exec(
"/home/giteaHook.sh",
"/home/test.sh",
(error, stdout, stderr) => {
if (error) {
console.log(`Error executing command: ${error}`);

View File

@ -54,7 +54,6 @@ import { WebLinksAddon } from "xterm-addon-web-links";
const TestDevice = ({ socket, user }) => {
const [isloading, setIsLoading] = useReducer((x) => x + 1, 0);
const [print, setPrint] = useState(false);
// const [scanCheck, setScanCheck] = useState(false);
const [openHistory, setOpenHistory] = useState(false);
const [listLastLogs, setlistLastLogs] = useState([]);
const [allStation, setAllStation] = useState([]);
@ -1158,9 +1157,7 @@ const TestDevice = ({ socket, user }) => {
});
socket?.on("sendListDeviceOn", (data) => {
// console.log(data)
setListDeviceOn(data);
// console.log(Date.now(), data);
// data.map((t) => {
// // if (listTestAuto.filter((item) => item.id === t.id).length === 0) {
// temp.push(t.infoLine);