TrueWinter / DiscordBot

My Discord bot. Development has been stopped
https://blog.truewinter.dev/2020/04/09/development-and-support-for-my-discord-bot-has-been-stopped
Apache License 2.0
46 stars 42 forks source link

Can't add more pages to the dashboard. #53

Closed DarkenLM closed 4 years ago

DarkenLM commented 4 years ago

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?

DarkenLM commented 4 years ago

Nvm. Figured it out.