diff --git a/manage-view/src/components/ListLog/ListLog.jsx b/manage-view/src/components/ListLog/ListLog.jsx index 5d099aa..7e70f23 100644 --- a/manage-view/src/components/ListLog/ListLog.jsx +++ b/manage-view/src/components/ListLog/ListLog.jsx @@ -11,7 +11,7 @@ const ListLog = () => { const [value, setValue] = useState(""); const getListFile = async () => { try { - const res = await axios.get(getListLog,{value: value}); + const res = await axios.get(getListLog); setListFile(res.data); setStatus(res.status); } catch (error) { @@ -21,7 +21,7 @@ const ListLog = () => { const findValueInLog = async () =>{ try { - const res = await axios.post(findValue); + const res = await axios.post(findValue,{value: value}); setValue(res.data) } catch (error) { diff --git a/start/routes.ts b/start/routes.ts index a95c086..11d4529 100644 --- a/start/routes.ts +++ b/start/routes.ts @@ -182,6 +182,7 @@ Route.post("/api/find-value", async ({ request, response }) => { try { const { value } = request.all(); + console.log(value) const { stdout, stderr } = await exec(`grep -nr "${value}" /home/logs`);