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