diff --git a/README.md b/README.md index 9902977..d04e2ca 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Canopy -0.4-INDEV Hotfix 2 +0.4-INDEV Hotfix 1 ========= Canopy - /ˈkæ.nə.pi/: diff --git a/src/controllers/api/account/deleteController.js b/src/controllers/api/account/deleteController.js index af70cbd..94b9cdf 100644 --- a/src/controllers/api/account/deleteController.js +++ b/src/controllers/api/account/deleteController.js @@ -38,7 +38,7 @@ module.exports.post = async function(req, res){ return res.send('Invalid Session! Cannot delete account while logged out!'); } - const userDB = await userModel.findOne({user: user.user}); + const userDB = await userModel.findOne(user); if(!userDB){ diff --git a/src/controllers/api/account/updateController.js b/src/controllers/api/account/updateController.js index 3a04355..befca96 100644 --- a/src/controllers/api/account/updateController.js +++ b/src/controllers/api/account/updateController.js @@ -46,7 +46,7 @@ module.exports.post = async function(req, res){ const {field, change} = data; const {user} = req.session; - const userDB = await userModel.findOne({user: user.user}); + const userDB = await userModel.findOne(user); const update = {}; diff --git a/src/schemas/tokebot/tokeCommandSchema.js b/src/schemas/tokebot/tokeCommandSchema.js index 635f487..19283f8 100644 --- a/src/schemas/tokebot/tokeCommandSchema.js +++ b/src/schemas/tokebot/tokeCommandSchema.js @@ -40,7 +40,7 @@ tokeCommandSchema.pre('save', async function (next){ if(this.isModified("command")){ if(server.channelManager != null && server.channelManager.chatHandler != null && - server.channelManager.chatHandler.chatPreprocessor != null){ + server.channelManager.chatHandler.chatPreprocessor == null){ //Get server tokebot object const tokebot = server.channelManager.chatHandler.chatPreprocessor.tokebot;