Skip to content
This repository was archived by the owner on Jan 2, 2025. It is now read-only.

Commit 14db29f

Browse files
committed
- Formatting + Spelling Fixes
1 parent f9aa4b0 commit 14db29f

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

.github/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ AuthenticationManager.email = "[email protected]" // email is overwritten and c
208208

209209

210210
##### Configuration
211-
By default the `AuthenticationManager` allows three authentication methods: Sign in with Email and Password, by using the Apple ID and anonymous login. If you want to restrict the providers, you can use a custom configuration object. With that the AuthenticationManager needs to be initialized on App Start.
211+
By default, the `AuthenticationManager` allows three authentication methods: Sign in with Email and Password, by using the Apple ID and anonymous login. If you want to restrict the providers, you can use a custom configuration object. With that, the AuthenticationManager needs to be initialized on App Start.
212212

213213
You can also link a repository where you manage your users details. If you subclass the `UserRepositoryProtocol`your user's details with the user details you get during the authentication process.
214214

@@ -284,7 +284,7 @@ AuthenticationManager.updatePassword(currentPassword: "123", newPassword: "456")
284284

285285
##### Authenticate by using Apple Id
286286

287-
The Authentication Manager controls the whole authentication flow and returns you the handled error without any further work.
287+
The Authentication Manager controls the whole authentication flow and returns the handled error without any further work.
288288

289289
###### SwiftUI:
290290

Sources/AuthenticationManager/UserRepositoryProtocol.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,8 @@ extension UserRepositoryProtocol {
5252
AuthenticationManager.checkAuthorizationState { result in
5353
proceed(result: result)
5454
}
55-
5655
case .emailPassword:
5756
proceed(result: AuthenticationManager.userIsAuthenticated ? .success(nil) : .failure(AuthenticationError.unknown))
58-
5957
case .anonymous:
6058
proceed(result: !AuthenticationManager.userIsAuthenticated ? .success(nil) : .failure(AuthenticationError.unknown))
6159
case .none:

Sources/FirestoreManager/CollectionRepository.swift

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,6 @@ open class CollectionRepository<T: Codable>: ObservableObject {
4646
}
4747
}
4848

49-
private func getPath(id: String) -> String {
50-
if let path = try? ref.reference().path {
51-
return "/" + path + "/\(id)"
52-
} else {
53-
return "/\(id)"
54-
}
55-
}
56-
5749
open func update(_ object: T, id: String, merge: Bool = false) {
5850
FirestoreManager.updateDocument(object, id: id, reference: ref, merge: merge) { result in
5951
switch result {
@@ -77,3 +69,14 @@ open class CollectionRepository<T: Codable>: ObservableObject {
7769

7870
open func didReceiveError(_ error: Error) { }
7971
}
72+
73+
74+
extension CollectionRepository {
75+
private func getPath(id: String) -> String {
76+
if let path = try? ref.reference().path {
77+
return "/" + path + "/\(id)"
78+
} else {
79+
return "/\(id)"
80+
}
81+
}
82+
}

0 commit comments

Comments
 (0)