File tree Expand file tree Collapse file tree
Neki-iOS/Features/QRCodeScanner/Sources/Domain/Sources Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import ComposableArchitecture
1212struct QRScannerClient {
1313 var checkAuthorizationStatus : @Sendable ( ) -> AVAuthorizationStatus
1414 var requestAccess : @Sendable ( ) async -> Bool
15- var parse : @Sendable ( _ urlString: String ) async throws -> ParsedQRResult
15+ var parse : @Sendable ( _ urlString: String , User ) async throws -> ParsedQRResult
1616 var processImage : @Sendable ( _ data: Data ) async throws -> [ Int ]
1717}
1818
@@ -25,9 +25,9 @@ extension QRScannerClient: DependencyKey {
2525 AVCaptureDevice . authorizationStatus ( for: . video)
2626 } requestAccess: {
2727 await AVCaptureDevice . requestAccess ( for: . video)
28- } parse: { urlString in
28+ } parse: { urlString, user in
2929 guard let url = URL ( string: urlString) else { throw QRParseError . invalidURL }
30- return try await qrCodeScanRepository. parse ( url)
30+ return try await qrCodeScanRepository. parse ( url, user : user )
3131 } processImage: { data in
3232 let processed = await ImageDownsamplingProcessor . process ( data: data)
3333 guard let imageData = processed? . data else { throw QRParseError . parsingFailed }
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ public enum QRParseError: Error {
2020}
2121
2222public protocol QRCodeScanRepository {
23- func parse( _ url: URL ) async throws ( QRParseError) -> ParsedQRResult
23+ func parse( _ url: URL , user : User ) async throws ( QRParseError) -> ParsedQRResult
2424}
2525
2626private enum QRCodeScanRepositoryKey : DependencyKey {
You can’t perform that action at this time.
0 commit comments