Skip to content
Snippets Groups Projects
Commit 0fef211f authored by Davor's avatar Davor
Browse files

changed variable names to snake case

parent 8c8b2d27
No related branches found
No related tags found
No related merge requests found
......@@ -12,9 +12,9 @@ def admin_required():
def decorator(*args, **kwargs):
verify_jwt_in_request()
claims = get_jwt()
userId = claims["user_id"]
isAdmin = RoleService.is_user_admin(userId)
if isAdmin:
user_id = claims["user_id"]
is_admin = RoleService.is_user_admin(user_id)
if is_admin:
return fn(*args, **kwargs)
else:
raise Unauthorized("You need to have admin permissions.")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment