Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions FirebaseFunctions/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 10.0.0
- [fixed] Remove unnecessary and unused `encoder` and `decoder` parameters from
`public func call(_ data: Request) async throws -> Response` API. (#9891)

# 9.3.0
- [fixed] Fixed error code generation for HTTP 409 - "already exists". (#9942)

Expand Down
7 changes: 1 addition & 6 deletions FirebaseFunctions/Sources/Callable+Codable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -121,18 +121,13 @@ public struct Callable<Request: Encodable, Response: Decodable> {
/// resumes with a new FCM Token the next time you call this method.
///
/// - Parameter data: The `Request` representing the data to pass to the trigger.
/// - Parameter encoder: The encoder instance to use to run the encoding.
/// - Parameter decoder: The decoder instance to use to run the decoding.
///
/// - Throws: An error if any value throws an error during encoding or decoding.
/// - Throws: An error if the callable fails to complete
///
/// - Returns: The decoded `Response` value
@available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *)
public func call(_ data: Request,
encoder: FirebaseDataEncoder = FirebaseDataEncoder(),
decoder: FirebaseDataDecoder =
FirebaseDataDecoder()) async throws -> Response {
public func call(_ data: Request) async throws -> Response {
let encoded = try encoder.encode(data)
let result = try await callable.call(encoded)
return try decoder.decode(Response.self, from: result.data)
Expand Down