From 35c2340a9b4fd06b12b44f1df9a7436ee5e7bd31 Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Mon, 10 Apr 2023 15:23:20 +0200 Subject: [PATCH] Forgot to implement the initialiser and make the "callAsFunction(endpoint: )" function public in the MakeURLrequestUseCase use case. --- .../Sources/APICore/Use Cases/MakeURLRequestUseCase.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Apps/Locations/Libraries/Sources/APICore/Use Cases/MakeURLRequestUseCase.swift b/Apps/Locations/Libraries/Sources/APICore/Use Cases/MakeURLRequestUseCase.swift index 1bcfa18..fce9754 100644 --- a/Apps/Locations/Libraries/Sources/APICore/Use Cases/MakeURLRequestUseCase.swift +++ b/Apps/Locations/Libraries/Sources/APICore/Use Cases/MakeURLRequestUseCase.swift @@ -11,12 +11,16 @@ import Foundation /// This use case generate a url request out of a given endpoint. public struct MakeURLRequestUseCase { + // MARK: Initialisers + + public init() {} + // MARK: Functions /// Generate a `URLRequest` instance out of a given endpoint that conforms to the `Endpoint` protocol. /// - Parameter endpoint: An endpoint which is used to generate a `URLRequest` instance from. /// - Returns: A `URLRequest` instance filled with data provided by the given endpoint. - func callAsFunction(endpoint: some Endpoint) throws -> URLRequest { + public func callAsFunction(endpoint: some Endpoint) throws -> URLRequest { var urlComponents = URLComponents() urlComponents.scheme = endpoint.scheme