From 98147fa2e7ef69ae070d3f1b39ff43aa973ec22f Mon Sep 17 00:00:00 2001 From: Oshanath Date: Mon, 22 Mar 2021 10:10:28 +0530 Subject: [PATCH] a --- Controllers/threadController.js | 4 +++- public/assets/javascript/threadView.js | 4 ++++ public/threadView.ejs | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Controllers/threadController.js b/Controllers/threadController.js index 2c74c6d..3a3772d 100644 --- a/Controllers/threadController.js +++ b/Controllers/threadController.js @@ -133,7 +133,7 @@ module.exports.getThreadData_post = (req, res) => { } if(filter.status == 'unread'){ - + } else if(filter.status != 'allStatus') searchQuery['status'] = filter.status; @@ -141,6 +141,8 @@ module.exports.getThreadData_post = (req, res) => { if(filter.type != 'allReqType') searchQuery['type'] = filter.type; + + let filterThreads = async (thread, filter) => { let string = filter.string.toLowerCase(); let searchWords = string.split(' '); diff --git a/public/assets/javascript/threadView.js b/public/assets/javascript/threadView.js index bfda35b..6b61bad 100644 --- a/public/assets/javascript/threadView.js +++ b/public/assets/javascript/threadView.js @@ -74,6 +74,9 @@ let getThreads = () => { // loading page open document.querySelector('.bouncer.left').classList.toggle('active'); + console.log(filter); + console.log("here"); + replyButton.className = 'replyBtn'; replyButtons.className = 'reply-btn-group'; @@ -92,6 +95,7 @@ let getThreads = () => { .then(response => response.json()) .then(data => { threads = data.array; + console.log(threads); numberOfPages = data.numberOfPages; initNav(); diff --git a/public/threadView.ejs b/public/threadView.ejs index 21bf94e..95e0498 100644 --- a/public/threadView.ejs +++ b/public/threadView.ejs @@ -60,7 +60,7 @@
× - + @@ -68,7 +68,7 @@ mark_as_unread