so basically, i'm using this code:
app.post("/settings/update/:id/:category", async (req, res) => {
let category = req.params.category;
if (category == "goodbye") {
var goodbye_message = req.body.goodbyeMessage;
await vibes.db.setServerVar(
"main",
"leave_message",
req.params.id,
goodbye_message
);
var goodbye_channel = req.body.goodbyeChannel;
console.log(goodbye_message, goodbye_channel)
await vibes.db.setServerVar(
"main",
"leave_channel",
req.params.id,
goodbye_channel
);
}
res.status(204).send();
});
and, when i submit my form, it returns the actual value that i use on my ejs files, but then it also returns undefined when i want to log it, like when i submit, it logs this in console:
undefined undefined
then it logs
test! 914519440576638997
so it basically logs as undefined, but then logs my value, how do i get rid of the undefined? because it makes my code not work proprely!