Skip to content

Commit

Permalink
return json data with success object
Browse files Browse the repository at this point in the history
  • Loading branch information
hebamoustafa authored Dec 3, 2021
1 parent 9477903 commit 0fd9b99
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/VGSShowSDK/Core/Show/Network/VGSShow+Network.swift
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ extension VGSShow {
}

// Handle unrevealed keys.
handleUnrevealedContentPaths(unrevealedContentPaths, code, completion: block)
handleUnrevealedContentPaths(unrevealedContentPaths, json, code, completion: block)
}

private func handleUnrevealedContentPaths(_ unrevealedContentPaths: [String], _ code: Int, extraAnalyticsInfo: [String: Any] = [:], completion block: @escaping (VGSShowRequestResult) -> Void) {
private func handleUnrevealedContentPaths(_ unrevealedContentPaths: [String], _ json: VGSJSONData, _ code: Int, extraAnalyticsInfo: [String: Any] = [:], completion block: @escaping (VGSShowRequestResult) -> Void) {

if !unrevealedContentPaths.isEmpty {
let warningMessage = "Cannot reveal data for contentPaths:\n\(VGSShow.formatDecodingContentPaths(unrevealedContentPaths))\n"
Expand All @@ -153,7 +153,7 @@ extension VGSShow {
// Track success.
VGSAnalyticsClient.shared.trackFormEvent(self, type: .submit, status: .success, extraData: extraAnalyticsInfo)

block(.success(code))
block(.success(code, json))
}

/// Track error event.
Expand Down

0 comments on commit 0fd9b99

Please sign in to comment.