修复
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
from flask import Flask, request, jsonify, render_template
|
||||
from .config import Config
|
||||
from .utils import get_latest_emails, get_latest_email_with_code, add_allowed_domain, remove_allowed_domain, get_allowed_domains, get_allowed_domains_with_time
|
||||
from .utils import (get_latest_emails, get_latest_email_with_code,
|
||||
add_allowed_domain, remove_allowed_domain,
|
||||
get_allowed_domains, get_allowed_domains_with_time,
|
||||
get_all_emails)
|
||||
import redis
|
||||
|
||||
def create_app():
|
||||
@@ -55,8 +58,7 @@ def create_app():
|
||||
@app.route('/web/list')
|
||||
def list_emails_page():
|
||||
try:
|
||||
# 不指定 recipient,获取所有邮件
|
||||
emails = get_latest_emails(recipient=None, count=50)
|
||||
emails = get_all_emails(count=50)
|
||||
return render_template('email_list.html', emails=emails)
|
||||
except Exception as e:
|
||||
app.logger.error(f"Error in list_emails_page: {str(e)}")
|
||||
|
||||
Reference in New Issue
Block a user