Remove hardcoded Zoho credentials - now users input credentials through frontend

This commit is contained in:
Iyeoluwa Akinrinola
2025-07-25 11:58:57 +01:00
parent 6dc5773943
commit 75c447fe03
4 changed files with 44 additions and 8 deletions
+6
View File
@@ -25,6 +25,8 @@ def load_config():
# Default configuration
default_config = {
'email_address': 'projects@manaknightdigital.com',
'zoho_email': '', # Will be set by user through frontend
'zoho_app_password': '', # Will be set by user through frontend
'time_frames': [
{'name': '1-24 hours', 'hours': 24, 'alert_level': 1},
{'name': '24-48 hours', 'hours': 48, 'alert_level': 2},
@@ -93,6 +95,10 @@ def update_settings():
# Update email address
config['email_address'] = request.form.get('email_address', config['email_address'])
# Update Zoho credentials
config['zoho_email'] = request.form.get('zoho_email', config.get('zoho_email', ''))
config['zoho_app_password'] = request.form.get('zoho_app_password', config.get('zoho_app_password', ''))
# Update email days back
config['email_days_back'] = int(request.form.get('email_days_back', 7))