-
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Batch child objects using transactions (#94)
* Batch child objects using transactions * codecov * clean up * nit * Add changelog * nits * Fixed bug linking anonymous user * prepare for release * remove old child object code * Update .codecov.yml
- Loading branch information
Showing
25 changed files
with
308 additions
and
363 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ coverage: | |
status: | ||
patch: | ||
default: | ||
target: 72 | ||
target: 77 | ||
changes: false | ||
project: | ||
default: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -131,11 +131,28 @@ do { | |
print("Error logging out: \(error)") | ||
} | ||
|
||
//: Password Reset Request - synchronously. | ||
do { | ||
try User.verificationEmail(email: "[email protected]") | ||
print("Successfully requested verification email be sent") | ||
} catch let error { | ||
print("Error requesting verification email be sent: \(error)") | ||
} | ||
|
||
//: Password Reset Request - synchronously. | ||
do { | ||
try User.passwordReset(email: "[email protected]") | ||
print("Successfully requested password reset") | ||
} catch let error { | ||
print("Error requesting password reset: \(error)") | ||
} | ||
|
||
//: Logging in anonymously. | ||
User.anonymous.login { result in | ||
switch result { | ||
case .success: | ||
print("Successfully logged in \(String(describing: User.current))") | ||
print("Session token: \(String(describing: User.current?.sessionToken))") | ||
case .failure(let error): | ||
print("Error logging in: \(error)") | ||
} | ||
|
@@ -149,36 +166,12 @@ User.current?.signup { result in | |
|
||
case .success(let user): | ||
print("Parse signup successful: \(user)") | ||
|
||
print("Session token: \(String(describing: User.current?.sessionToken))") | ||
case .failure(let error): | ||
print("Error logging in: \(error)") | ||
} | ||
} | ||
|
||
//: Logging out - synchronously. | ||
do { | ||
try User.logout() | ||
print("Successfully logged out") | ||
} catch let error { | ||
print("Error logging out: \(error)") | ||
} | ||
|
||
//: Password Reset Request - synchronously. | ||
do { | ||
try User.verificationEmail(email: "[email protected]") | ||
print("Successfully requested verification email be sent") | ||
} catch let error { | ||
print("Error requesting verification email be sent: \(error)") | ||
} | ||
|
||
//: Password Reset Request - synchronously. | ||
do { | ||
try User.passwordReset(email: "[email protected]") | ||
print("Successfully requested password reset") | ||
} catch let error { | ||
print("Error requesting password reset: \(error)") | ||
} | ||
|
||
PlaygroundPage.current.finishExecution() | ||
|
||
//: [Next](@next) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.