Skip to content

Commit 9f117e2

Browse files
committed
chore: fix build errors for kotlin and dotnet
1 parent e315f6c commit 9f117e2

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

templates/dotnet/Package/Client.cs.twig

+2-3
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,8 @@ namespace {{ spec.title | caseUcfirst }}
149149
new HttpMethod(method),
150150
_endpoint + path + queryString);
151151

152-
if ("multipart/form-data".Equals(
153-
headers["content-type"],
154-
StringComparison.OrdinalIgnoreCase))
152+
if (headers.TryGetValue("content-type", out var contentType) &&
153+
"multipart/form-data".Equals(contentType, StringComparison.OrdinalIgnoreCase))
155154
{
156155
var form = new MultipartFormDataContent();
157156

templates/kotlin/src/main/kotlin/io/appwrite/services/ServiceTemplate.kt.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class {{ service.name | caseUcfirst }}(client: Client) : Service(client) {
5555
"{{ parameter.name }}" to {{ parameter.name | caseCamel }},
5656
{%~ endfor %}
5757
)
58-
val apiHeaders = mutableMapOf(
58+
val apiHeaders = mutableMapOf<String, String>(
5959
{%~ for key, header in method.headers %}
6060
"{{ key }}" to "{{ header }}",
6161
{%~ endfor %}

0 commit comments

Comments
 (0)