linuxrouter/docker/routlin-dash/app/action_accountlogout.py

12 lines
261 B
Python
Raw Permalink Normal View History

2026-05-17 03:26:01 -04:00
from flask import Blueprint, session, redirect
2026-06-07 00:21:08 -04:00
import auth
2026-05-17 03:26:01 -04:00
2026-05-27 20:56:30 -04:00
bp = Blueprint('accountlogout', __name__)
2026-05-17 03:26:01 -04:00
2026-05-27 22:04:04 -04:00
@bp.route('/action/accountlogout/logout', methods=['POST'])
2026-06-07 00:21:08 -04:00
@auth.require_level('viewer')
2026-05-27 22:04:04 -04:00
def logout():
2026-05-17 03:26:01 -04:00
session.clear()
2026-05-27 22:04:04 -04:00
return redirect('/overview')