From 0720ee91109a55d2846710ae6bef4a2deb7eb26b Mon Sep 17 00:00:00 2001 From: huangzhenpc Date: Sat, 1 Mar 2025 11:25:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E5=AD=98=E7=8E=B0=E6=9C=89=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=20=E5=A2=9E=E5=8A=A0=E5=9F=9F=E5=90=8D=E5=92=8C?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=97=B6=E9=97=B4=E5=85=B3=E8=81=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/__init__.py b/app/__init__.py index 763a010..ec744e2 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -1,6 +1,6 @@ from flask import Flask, request, jsonify from .config import Config -from .utils import get_latest_emails, get_latest_email_with_code, add_allowed_domain, remove_allowed_domain, get_allowed_domains +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 def create_app(): app = Flask(__name__) @@ -46,4 +46,9 @@ def create_app(): domains = get_allowed_domains() return jsonify(domains), 200 + @app.route('/allowed_domains_with_time', methods=['GET']) + def list_domains_with_time(): + domains_with_time = get_allowed_domains_with_time() + return jsonify(domains_with_time), 200 + return app \ No newline at end of file