From 0fef211f5d010b23f010293090a5bac35aecda74 Mon Sep 17 00:00:00 2001 From: Davor Date: Fri, 10 Jun 2022 11:34:33 +0200 Subject: [PATCH] changed variable names to snake case --- helpers/auth_guard.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/helpers/auth_guard.py b/helpers/auth_guard.py index 0a28c3d..900e35e 100644 --- a/helpers/auth_guard.py +++ b/helpers/auth_guard.py @@ -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.")