Fix error status in client join

This commit is contained in:
Logan Cusano
2023-06-10 20:46:43 -04:00
parent fc11324714
commit 041e0d485d

View File

@@ -24,7 +24,7 @@ exports.getStatus = (req, res) => {
* Start the bot and join the server and preset specified
*/
exports.joinServer = async (req, res) => {
if (!req.body.clientId || !req.body.channelId) return res.send("500").json({"message": "You must include the client ID (discord token), channel ID (The discord ID of the channel to connect to)"});
if (!req.body.clientId || !req.body.channelId) return res.status(500).json({"message": "You must include the client ID (discord token), channel ID (The discord ID of the channel to connect to)"});
const deviceId = process.env.AUDIO_DEVICE_ID;
const channelId = req.body.channelId;
const clientId = req.body.clientId;