fix some namespace responses

This commit is contained in:
Patrick Jentsch 2024-11-11 08:45:16 +01:00
parent bd0a9c60f8
commit 29365984a3

View File

@ -11,7 +11,7 @@ class UsersNamespace(Namespace):
user_id = hashids.decode(user_hashid)
if not isinstance(user_id, int):
return {'code': 400, 'msg': 'Bad Request'}
return {'status': 400, 'statusText': 'Bad Request'}
user = User.query.get(user_id)
@ -38,7 +38,7 @@ class UsersNamespace(Namespace):
user_id = hashids.decode(user_hashid)
if not isinstance(user_id, int):
return {'code': 400, 'msg': 'Bad Request'}
return {'status': 400, 'statusText': 'Bad Request'}
user = User.query.get(user_id)
@ -60,7 +60,7 @@ class UsersNamespace(Namespace):
user_id = hashids.decode(user_hashid)
if not isinstance(user_id, int):
return {'code': 400, 'msg': 'Bad Request'}
return {'status': 400, 'statusText': 'Bad Request'}
user = User.query.get(user_id)