Skip to content

Commit

Permalink
Add coding keys for Challenge object
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisabhash committed Apr 30, 2024
1 parent 85f05e0 commit da6f6e9
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import Foundation

@_spi(PredictionsFaceLiveness)
public struct Challenge {
public struct Challenge: Codable {
public let version: String
public let type: ChallengeType

Expand All @@ -20,6 +20,11 @@ public struct Challenge {
public func queryParameterString() -> String {
return self.type.rawValue + "_" + self.version
}

enum CodingKeys: String, CodingKey {
case version = "Version"
case type = "Type"
}
}

@_spi(PredictionsFaceLiveness)
Expand Down

0 comments on commit da6f6e9

Please sign in to comment.