update findValue
This commit is contained in:
parent
ecf5cc4ccf
commit
e4f4f54dbb
|
|
@ -21,7 +21,7 @@ const ListLog = () => {
|
|||
|
||||
const findValueInLog = async () =>{
|
||||
try {
|
||||
const res = await axios.post(findValue,{value: value});
|
||||
const res = await axios.post(findValue,{value: valueSearch});
|
||||
|
||||
setValue(res.data)
|
||||
} catch (error) {
|
||||
|
|
|
|||
|
|
@ -183,9 +183,9 @@ Route.post("/api/find-value", async ({ request, response }) => {
|
|||
const { value } = request.all();
|
||||
|
||||
console.log(value)
|
||||
const { stdout, stderr } = await exec(`grep -nr "${value}" /home/logs`);
|
||||
const { stdout, stderr } = await exec(`grep -nr "${value}" /home/logs`,{maxBuffer: 1024 * 500});
|
||||
|
||||
|
||||
// response.status(200).send("sdjkghs");
|
||||
response.status(200).send(JSON.stringify(stdout));
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
|
|
|
|||
Loading…
Reference in New Issue