Update app.py
This commit is contained in:
11
app.py
11
app.py
@@ -4210,9 +4210,11 @@ def robots_txt():
|
||||
)
|
||||
return content, 200, {"Content-Type": "text/plain"}
|
||||
|
||||
@app.route('/debug-socket')
|
||||
@login_required # opcjonalnie
|
||||
def debug_socket():
|
||||
from flask import render_template_string
|
||||
@app.route('/admin/debug-socket')
|
||||
@login_required
|
||||
@admin_required
|
||||
def debug_socket():
|
||||
return render_template_string('''
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
@@ -4279,7 +4281,7 @@ def debug_socket():
|
||||
updateStatus(true);
|
||||
document.getElementById('transport').textContent = socket.io.engine.transport.name;
|
||||
document.getElementById('sid').textContent = socket.id?.slice(0,8) + '...';
|
||||
socket.emit('requestfulllist', {listid: window.LISTID || 1});
|
||||
socket.emit('requestfulllist', {listid: 1});
|
||||
});
|
||||
|
||||
socket.on('disconnect', (reason) => {
|
||||
@@ -4322,7 +4324,6 @@ def debug_socket():
|
||||
</html>
|
||||
''')
|
||||
|
||||
|
||||
# =========================================================================================
|
||||
# SOCKET.IO
|
||||
# =========================================================================================
|
||||
|
||||
Reference in New Issue
Block a user