From f8bdfa3a04fdcdb55a36bdd688e520926df635ed Mon Sep 17 00:00:00 2001
From: Patrick Jentsch
Date: Wed, 13 Jan 2021 15:44:39 +0100
Subject: [PATCH] use 'msg' instead of 'desc' key for error messages
---
web/app/decorators.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/web/app/decorators.py b/web/app/decorators.py
index de0189ad..b74d684e 100644
--- a/web/app/decorators.py
+++ b/web/app/decorators.py
@@ -38,7 +38,7 @@ def socketio_admin_required(f):
if current_user.is_administrator:
return f(*args, **kwargs)
else:
- response = {'code': 401, 'desc': 'Unauthorized'}
+ response = {'code': 401, 'msg': 'Unauthorized'}
socketio.emit(request.event['message'], response, room=request.sid)
return wrapped
@@ -49,6 +49,6 @@ def socketio_login_required(f):
if current_user.is_authenticated:
return f(*args, **kwargs)
else:
- response = {'code': 401, 'desc': 'Unauthorized'}
+ response = {'code': 401, 'msg': 'Unauthorized'}
socketio.emit(request.event['message'], response, room=request.sid)
return wrapped