update findValue

This commit is contained in:
Joseph Le 2023-11-23 20:29:55 +11:00
parent 3a377f9f25
commit ecf5cc4ccf
2 changed files with 3 additions and 2 deletions

View File

@ -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) {

View File

@ -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`);