Skip to content

Conversation

hhuuggoo
Copy link
Collaborator

Example for how to automate creating users in Saturn Cloud

@hhuuggoo hhuuggoo requested a review from jsignell as a code owner October 17, 2022 15:05
Copy link
Contributor

@jsignell jsignell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor comment. Otherwise looks good.


def check_for_account_by_username(username: str) -> bool:
url = f"{BASE_URL}/api/users"
query_string = urlencode(dict(q=f"username:{username}", page=1, size=1))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
query_string = urlencode(dict(q=f"username:{username}", page=1, size=1))
query_string = urlencode(dict(q=f"username:{username}", page=1, page_size=1))


def check_for_account_by_email(email: str) -> bool:
url = f"{BASE_URL}/api/users"
query_string = urlencode(dict(q=f"email:{email}", page=1, size=1))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
query_string = urlencode(dict(q=f"email:{email}", page=1, size=1))
query_string = urlencode(dict(q=f"email:{email}", page=1, page_size=1))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants