Skip to content

Commit 2d89f55

Browse files
authored
Remove unnecessary, unused parameters from API (#10232)
1 parent 5437380 commit 2d89f55

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

FirebaseFunctions/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 10.0.0
2+
- [fixed] Remove unnecessary and unused `encoder` and `decoder` parameters from
3+
`public func call(_ data: Request) async throws -> Response` API. (#9891)
4+
15
# 9.3.0
26
- [fixed] Fixed error code generation for HTTP 409 - "already exists". (#9942)
37

FirebaseFunctions/Sources/Callable+Codable.swift

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,18 +121,13 @@ public struct Callable<Request: Encodable, Response: Decodable> {
121121
/// resumes with a new FCM Token the next time you call this method.
122122
///
123123
/// - Parameter data: The `Request` representing the data to pass to the trigger.
124-
/// - Parameter encoder: The encoder instance to use to run the encoding.
125-
/// - Parameter decoder: The decoder instance to use to run the decoding.
126124
///
127125
/// - Throws: An error if any value throws an error during encoding or decoding.
128126
/// - Throws: An error if the callable fails to complete
129127
///
130128
/// - Returns: The decoded `Response` value
131129
@available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *)
132-
public func call(_ data: Request,
133-
encoder: FirebaseDataEncoder = FirebaseDataEncoder(),
134-
decoder: FirebaseDataDecoder =
135-
FirebaseDataDecoder()) async throws -> Response {
130+
public func call(_ data: Request) async throws -> Response {
136131
let encoded = try encoder.encode(data)
137132
let result = try await callable.call(encoded)
138133
return try decoder.decode(Response.self, from: result.data)

0 commit comments

Comments
 (0)