Skip to content

Commit d4e6cf5

Browse files
committed
[Chore] #188 - 웹훅 메세지 내용을 채우기 위한 유저세션정보 주입
1 parent 2b09a98 commit d4e6cf5

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Neki-iOS/Features/QRCodeScanner/Sources/Domain/Sources/Clients/QRCodeScannerClient.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import ComposableArchitecture
1212
struct 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 }

Neki-iOS/Features/QRCodeScanner/Sources/Domain/Sources/Interfaces/QRCodeScanRepository.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public enum QRParseError: Error {
2020
}
2121

2222
public protocol QRCodeScanRepository {
23-
func parse(_ url: URL) async throws(QRParseError) -> ParsedQRResult
23+
func parse(_ url: URL, user: User) async throws(QRParseError) -> ParsedQRResult
2424
}
2525

2626
private enum QRCodeScanRepositoryKey: DependencyKey {

0 commit comments

Comments
 (0)