Development
This commit is contained in:
parent
8766c6c9a2
commit
ee31a18ac6
43 changed files with 54 additions and 48 deletions
|
|
@ -1,17 +0,0 @@
|
|||
from flask import Blueprint, redirect, flash
|
||||
from auth import require_level
|
||||
|
||||
bp = Blueprint('action_clear_ddns_log', __name__)
|
||||
|
||||
LOG_FILE = '/configs/ddns.log'
|
||||
|
||||
|
||||
@bp.route('/action/clear_ddns_log', methods=['POST'])
|
||||
@require_level('administrator')
|
||||
def clear_ddns_log():
|
||||
try:
|
||||
open(LOG_FILE, 'w').close()
|
||||
flash('DDNS log cleared.', 'success')
|
||||
except Exception as ex:
|
||||
flash(f'Could not clear log: {ex}', 'error')
|
||||
return redirect('/view/view_ddns')
|
||||
Loading…
Add table
Add a link
Reference in a new issue