Skip to content

Commit

Permalink
Fixed error using wrong method in bulk reset password
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan-Prescott committed Mar 6, 2024
1 parent f5e1b92 commit c220fa6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions odins_spear/methods/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,15 +435,13 @@ def sip_passwords_generate(self, limit: int =10) -> dict:
"""Generates multiple SIP passwords to the limit set in parameters. Defaults to 10.
Args:
service_provider_id (str): Service Provider ID where Group is located.
group_id (str): Group ID to generate SIP password for.
limit (int, optional): Number of passwords api will return. Defaults to 10.
Returns:
dict: Mutliple SIP passwords generated according to the groups rules.
"""

endpoint = f"/sip-password/generate&limit={limit}"
endpoint = f"/password/generate?limit={limit}"

return self.requester.get(endpoint)

Expand Down
2 changes: 1 addition & 1 deletion odins_spear/scripts/bulk_password_reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def main(api, service_provider_id: str, group_id: str, users: list, password_typ
if password_type.lower() == "sip":

logger.log_info("Generating new SIP passwords.")
new_passwords = api.get.sip_passwords_generate(service_provider_id, group_id, len(users))['passwords']
new_passwords = api.get.sip_passwords_generate(len(users))['passwords']
users_and_new_passwords = list(zip(users, new_passwords))

logger.log_info("Setting new SIP passwords.")
Expand Down

0 comments on commit c220fa6

Please sign in to comment.