Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove remaining parameters parameter #607

Merged
merged 2 commits into from
Dec 21, 2021
Merged

Conversation

Widcket
Copy link
Contributor

@Widcket Widcket commented Dec 21, 2021

Changes

⚠️ THIS PR CONTAINS BREAKING CHANGES

In the PR that removed the parameters parameter across the SDK, the one in the method startPasswordless(email:type:connection:) from the Authentication API client was skipped because that method had some conditional logic for sending those parameters. But since the Request.parameters method allows adding arbitrary parameters to any request (even that one), that logic does not hold anymore. So this PR removes the last remaining parameters parameter from the startPasswordless(email:type:connection:) method.

References

See #530

Testing

  • This change adds unit test coverage
  • This change has been tested on the latest version of the platform/language or why not

Checklist

@Widcket Widcket requested a review from a team as a code owner December 21, 2021 02:23
@Widcket Widcket added the review:small Small review label Dec 21, 2021
@@ -631,12 +631,8 @@ public extension Authentication {
return self.signup(email: email, username: username, password: password, connection: connection, userMetadata: userMetadata, rootAttributes: rootAttributes)
}

func signup(email: String, username: String? = nil, password: String, connection: String, userMetadata: [String: Any]? = nil) -> Request<DatabaseUser, AuthenticationError> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This overload is not necessary because there is one above that adds default values to all the optional params. This one was adding default values to all but one. But in Swift you can omit a parameter if it has a default value (as per the overload above). So this one is pointless.

@Widcket Widcket merged commit 656bab9 into beta Dec 21, 2021
@Widcket Widcket deleted the v2/passwordless-parameters branch December 21, 2021 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review:small Small review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants