From 5c428261640ad5c8274d49455cbacbff372a4d77 Mon Sep 17 00:00:00 2001 From: suseendhiran17 <58357088+suseendhiran17@users.noreply.github.com> Date: Wed, 19 Jul 2023 18:05:15 +0530 Subject: [PATCH] susee:log --- app/views/module.ejs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/views/module.ejs b/app/views/module.ejs index e62293c..a1f9ca5 100644 --- a/app/views/module.ejs +++ b/app/views/module.ejs @@ -297,12 +297,13 @@ $(document).ready(function () { $(".fileName").click(function(){ data = $(this).attr('id').split("|"); + var getUrl = window.location; + path_name = getUrl.pathname.slice(0,-4)+'readlogs'; $.ajax({ type: "post", - url: "/api/readlogs", + url: path_name, data: {'file' : data[0] , 'folder' : data[1]}, success: function(response) { - console.log(response); $('.modal-title').html(data[0]); $('.modal-body').html(response.data); $('#myModal').modal('show'); @@ -315,9 +316,12 @@ $(".fileName").click(function(){ $(".delete").click(function(){ data = $(this).attr('id').split("|"); + var getUrl = window.location; + path_name = getUrl.pathname.slice(0,-4)+'deletelog'; +alert(path_name) $.ajax({ type: "post", - url: "/api/deletelog", + url: path_name, data: {'file' : data[0] , 'folder' : data[1]}, success: function(response) { console.log(response);