From ce31698cc401de37374f4bc04fcc99c338f37aba Mon Sep 17 00:00:00 2001 From: salvacybersec Date: Mon, 10 Nov 2025 19:24:49 +0300 Subject: [PATCH] fix: Gmail App Password parameter name in settings controller - Changed gmail_password to gmail_app_password in request body destructuring - Matches frontend Settings.jsx which sends gmail_app_password - Backend still stores as 'gmail_password' key in database (for backward compatibility) --- backend/src/controllers/settings.controller.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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', });