Skip to content

Commit

Permalink
Add default decoding strategy fpr fake
Browse files Browse the repository at this point in the history
  • Loading branch information
3lvis committed Jul 18, 2024
1 parent f420cce commit 14fadb6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/Networking/Networking+New.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ extension Networking {
logger.info("Successfully processed fake request to \(path, privacy: .public)")
return .success(() as! T)
} else {
let decodedResponse = try JSONDecoder().decode(T.self, from: response.data)
let decoder = JSONDecoder()
decoder.dateDecodingStrategy = .iso8601
let decodedResponse = try decoder.decode(T.self, from: response.data)
logger.info("Successfully decoded response from fake request to \(path, privacy: .public)")
return .success(decodedResponse)
}
Expand Down

0 comments on commit 14fadb6

Please sign in to comment.