changed variable names to snake case

This commit is contained in:
Davor 2022-06-10 11:34:33 +02:00
parent 8c8b2d27fc
commit 0fef211f5d

View file

@ -12,9 +12,9 @@ def admin_required():
def decorator(*args, **kwargs): def decorator(*args, **kwargs):
verify_jwt_in_request() verify_jwt_in_request()
claims = get_jwt() claims = get_jwt()
userId = claims["user_id"] user_id = claims["user_id"]
isAdmin = RoleService.is_user_admin(userId) is_admin = RoleService.is_user_admin(user_id)
if isAdmin: if is_admin:
return fn(*args, **kwargs) return fn(*args, **kwargs)
else: else:
raise Unauthorized("You need to have admin permissions.") raise Unauthorized("You need to have admin permissions.")