Skip to content

Commit

Permalink
fix: re-enable non-empty two factor authentication
Browse files Browse the repository at this point in the history
Close #281
  • Loading branch information
sbertix committed Mar 29, 2022
1 parent 94f47a1 commit 6fa8157
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public extension Authenticator.Group.Basic {
.prepare(with: requester)
.tryMap { result throws -> Secret in
let value = try Wrapper.decode(result.data)
guard value.isEmpty, let response = result.response as? HTTPURLResponse else {
guard !value.isEmpty, let response = result.response as? HTTPURLResponse else {
throw Authenticator.Error.invalidResponse(result.response)
}
// Prepare the actual `Secret`.
Expand Down
8 changes: 4 additions & 4 deletions Tests/SwiftagramTests/EndpointTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ private let delay: TimeInterval = 1
private let timeout: TimeInterval = 30

// swiftlint:disable file_length
// swiftlint:disable function_body_length
// swiftlint:disable type_body_length
// swiftlint:disable function_body_length
/// A `class` dealing with testing all available `Endpoint`s.
@available(iOS 13, macOS 10.15, tvOS 13, watchOS 6, *)
internal final class EndpointTests: XCTestCase {
Expand Down Expand Up @@ -565,8 +565,8 @@ internal final class EndpointTests: XCTestCase {
}
// swiftlint:enable function_body_length
}
// swiftlint:enable file_length
// swiftlint:enable function_body_length
// swiftlint:enable type_body_length

#endif
// swiftlint:enable function_body_length
// swiftlint:enable type_body_length
// swiftlint:enable file_length

0 comments on commit 6fa8157

Please sign in to comment.