File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 7
7
from utils .azure_users import AzureConnection
8
8
9
9
10
- azure_connection = AzureConnection ()
11
-
12
10
ns = api .namespace ('users' , description = 'Namespace of the API for users' )
13
11
14
12
# User Model
@@ -59,7 +57,7 @@ class Users(Resource):
59
57
@ns .marshal_list_with (user_response_fields )
60
58
def get (self ):
61
59
"""List all users"""
62
- return azure_connection .users ()
60
+ return AzureConnection () .users ()
63
61
64
62
65
63
@ns .route ('/<string:id>/roles' )
@@ -75,7 +73,7 @@ class UserRoles(Resource):
75
73
@ns .marshal_with (user_response_fields )
76
74
def post (self , id ):
77
75
"""Create user's role"""
78
- return azure_connection .update_user_role (id , ns .payload ['role' ])
76
+ return AzureConnection () .update_user_role (id , ns .payload ['role' ])
79
77
80
78
81
79
@ns .route ('/<string:user_id>/roles/<string:role_id>' )
@@ -88,4 +86,4 @@ class UserRole(Resource):
88
86
@ns .marshal_with (user_response_fields )
89
87
def delete (self , user_id , role_id ):
90
88
"""Delete user's role"""
91
- return azure_connection .update_user_role (user_id , role = None )
89
+ return AzureConnection () .update_user_role (user_id , role = None )
You can’t perform that action at this time.
0 commit comments