保存现有功能 增加域名和添加时间关联
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user