Added res/req to app.js and fixed naming bug in botcontroller

This commit is contained in:
Logan Cusano
2023-03-26 15:45:54 -04:00
parent 988683ab72
commit ccb42e7fba
2 changed files with 6 additions and 6 deletions

View File

@@ -23,7 +23,7 @@ function getGuilds(req) {
/**
* Get Status of the discord process
*/
exports.getStatus = (req, res) => {
exports.getStatus = (res, req) => {
guildIds = getGuilds(req);
var guildStatuses = []
for (const guildID of guildIds){
@@ -33,13 +33,13 @@ exports.getStatus = (req, res) => {
else guildStatuses.push({ guildID: 202 })
}});
}
return req.send(200).json(guildStatuses);
return res.send(200).json(guildStatuses);
}
/**
* Start the bot and join the server and preset specified
*/
exports.joinServer = (req, res) => {
exports.joinServer = (res, req) => {
const channelID = req.body.channelID;
const presetName = req.body.presetName;
@@ -53,8 +53,8 @@ exports.joinServer = (req, res) => {
/**
* Leaves the server if it's in one
*/
exports.leaveServer = (req, res) => {
exports.leaveServer = (res, req) => {
leave({guildID: guildID, callback: (response) => {
return req.sendStatus(202);
return res.sendStatus(202);
}});
}