remove the route

This commit is contained in:
Karl 2025-07-19 10:08:37 +01:00
parent ef38edfcd4
commit 824bdd080f
2 changed files with 4 additions and 14 deletions

12
app.py
View File

@ -315,17 +315,7 @@ def config_dashboard():
"""Renders the configuration dashboard."""
if not session.get('config_logged_in'):
return redirect(url_for('config'))
DNS_FILE = os.path.join(os.path.dirname(__file__), '..', 'KTVManager_python', 'ktvmanager', 'lib', 'DNS_list.txt')
def read_dns_list():
if not os.path.exists(DNS_FILE):
return []
with open(DNS_FILE, 'r') as f:
return [line.strip() for line in f.readlines()]
dns_list = read_dns_list()
return render_template('config_dashboard.html', dns_list=dns_list)
return render_template('config_dashboard.html')
@app.route('/check-expiring-accounts', methods=['POST'])
def check_expiring_accounts():

View File

@ -38,7 +38,7 @@
const dnsEntryInput = document.getElementById('dns-entry-input');
function fetchDnsList() {
fetch("{{ url_for('dns.get_dns_list') }}")
fetch("{{ config.BASE_URL }}/dns")
.then(response => response.json())
.then(data => {
dnsList.innerHTML = '';
@ -63,7 +63,7 @@
function addDnsEntry() {
const dnsEntry = dnsEntryInput.value.trim();
if (dnsEntry) {
fetch("{{ url_for('dns.add_dns') }}", {
fetch("{{ config.BASE_URL }}/dns", {
method: 'POST',
headers: {
'Content-Type': 'application/json'
@ -77,7 +77,7 @@
}
function removeDnsEntry(dnsEntry) {
fetch("{{ url_for('dns.remove_dns') }}", {
fetch("{{ config.BASE_URL }}/dns", {
method: 'DELETE',
headers: {
'Content-Type': 'application/json'