diff --git a/src/server.js b/src/server.js index 2657eb4..d2a461d 100644 --- a/src/server.js +++ b/src/server.js @@ -521,6 +521,24 @@ app.post("/post-test", (req, res) => { return res.status(200).json({ "success": true, "message": "POST request received", "data": req.body }) }); +app.get("/tnyk/:sf_token", (req, res) => { + const sf_token = req.params.sf_token; + console.log("Received token:", sf_token); + + try { + const decoded = jwt.verify(sf_token, process.env.JWT_SECRET_SF_TOKEN); + if (decoded) { + res.render('client/dashboard-dashboard', { sf_token: sf_token }); + } else { + res.render('not_found', { title: "Client" }); + } + } catch (error) { + res.render('not_found', { title: "Client" }); + } + + +}); + app.use((req, res) => { res.status(404).render("not_found", { title: "404 - Page Not Found" diff --git a/views/client/dashboard-dashboard.ejs b/views/client/dashboard-dashboard.ejs index 8c65c78..91049bb 100644 --- a/views/client/dashboard-dashboard.ejs +++ b/views/client/dashboard-dashboard.ejs @@ -1,5 +1,6 @@ + @@ -7,6 +8,7 @@ +
- +
- + @@ -122,7 +124,8 @@
-

Virtual Assistants 0 VAs

+

Virtual Assistants 0 + VAs

@@ -170,7 +173,7 @@ Projects 0 - +
@@ -203,7 +206,7 @@ - + - + + + \ No newline at end of file