use 'msg' instead of 'desc' key for error messages

This commit is contained in:
Patrick Jentsch 2021-01-13 15:44:39 +01:00
parent 4bf456d8ef
commit f8bdfa3a04

View File

@ -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