diff --git a/backend/src/controllers/settings.controller.js b/backend/src/controllers/settings.controller.js index 2dd8401..25aaa86 100644 --- a/backend/src/controllers/settings.controller.js +++ b/backend/src/controllers/settings.controller.js @@ -25,7 +25,7 @@ exports.getAllSettings = async (req, res, next) => { // Update Gmail settings exports.updateGmailSettings = async (req, res, next) => { try { - const { gmail_user, gmail_password, gmail_from_name } = req.body; + const { gmail_user, gmail_app_password, gmail_from_name } = req.body; if (gmail_user) { await Settings.upsert({ @@ -36,10 +36,10 @@ exports.updateGmailSettings = async (req, res, next) => { }); } - if (gmail_password) { + if (gmail_app_password) { await Settings.upsert({ key: 'gmail_password', - value: gmail_password, + value: gmail_app_password, is_encrypted: true, description: 'Gmail App Password', });