Hello. I've been trying to add more pages to the web dashboard of the bot, but it seems that it isn't working. I still haven't tried to add an ejs page, but the app.get events I've added aren't firing.
For example, I have this code for an API I'm developing:
app.get("/api/:action", async (req, res) => {
let action = req.params.action
if (action) {
//Alot of code
} else {
res.send('Invalid API call method.')
}
});
And I already tried to change async (req, res) => { to async function (req, res) and still don't work. Any idea of what's going on?
Hello. I've been trying to add more pages to the web dashboard of the bot, but it seems that it isn't working. I still haven't tried to add an ejs page, but the app.get events I've added aren't firing.
For example, I have this code for an API I'm developing:
And I already tried to change async (req, res) => { to
async function (req, res)
and still don't work. Any idea of what's going on?