Skip to content

Commit 4f4ea9d

Browse files
authored
update step comments
1 parent f6adc70 commit 4f4ea9d

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

app/admin/examples/eg001_create_a_new_user/controller.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,11 @@ def get_permission_profiles(args):
4141
header_value=f"Bearer {access_token}"
4242
)
4343

44+
# Step 3 start
4445
accounts_api = AccountsApi(api_client=api_client)
4546
profiles = accounts_api.list_permissions(account_id=account_id)
4647
profiles_list = profiles.to_dict()["permission_profiles"]
47-
48+
# Step 3 end
4849
return profiles_list
4950

5051
@staticmethod
@@ -60,12 +61,13 @@ def get_groups(args):
6061
header_name="Authorization",
6162
header_value=f"Bearer {access_token}"
6263
)
63-
64+
65+
# Step 4 start
6466
groups_api = GroupsApi(api_client)
6567
groups = groups_api.list_groups(account_id=account_id)
6668
groups_dict = groups.to_dict()
6769
groups_list = groups_dict["groups"]
68-
70+
# Step 4 end
6971
return groups_list
7072

7173
@staticmethod
@@ -100,7 +102,7 @@ def worker(self, args):
100102
# Step 2 end
101103

102104
# Create a request body for the create_user method
103-
# Step 3 start
105+
# Step 5 start
104106
request_body = {
105107
"user_name": args["user_name"],
106108
"first_name": args['first_name'],
@@ -121,13 +123,13 @@ def worker(self, args):
121123
}
122124
]
123125
}
124-
# Step 3 end
126+
# Step 5 end
125127

126128
# Creates a user using a method from the user API
127-
# Step 4 start
129+
# Step 6 start
128130
response = user_api.create_user(
129131
args["organization_id"],
130132
request_body
131133
)
132-
# Step 4 end
134+
# Step 6 end
133135
return response

0 commit comments

Comments
 (0)