Skip to content

Commit

Permalink
Make token authorization sendable
Browse files Browse the repository at this point in the history
  • Loading branch information
ubfelix committed Oct 11, 2024
1 parent e1c0935 commit b43e20a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ public protocol UBURLRequestTokenAuthorization: UBURLRequestModifier {
/// Fetches the token and returns it
///
/// - Parameter completion: The completion should be called with success or failure
func getToken(completion: @escaping (Result<String, Error>) -> Void)
func getToken(completion: @escaping @Sendable (Result<String, Error>) -> Void)
}

public extension UBURLRequestTokenAuthorization {
/// :nodoc:
func modifyRequest(_ originalRequest: UBURLRequest, completion: @escaping (Result<UBURLRequest, Error>) -> Void) {
func modifyRequest(_ originalRequest: UBURLRequest, completion: @escaping @Sendable (Result<UBURLRequest, Error>) -> Void) {
getToken { result in
var modifierRequest = originalRequest
switch result {
Expand Down

0 comments on commit b43e20a

Please sign in to comment.