Skip to content

Commit e2c665d

Browse files
authored
Fix byte array check
1 parent f875c96 commit e2c665d

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

templates/dotnet/src/Appwrite/Client.cs.twig

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ namespace {{ spec.title | caseUcfirst }}
221221
.FirstOrDefault() ?? string.Empty;
222222

223223
var isJson = contentType.Contains("application/json");
224-
var isBytes = contentType.Contains("application/octet-stream");
225224

226225
if (code >= 400) {
227226
var message = await response.Content.ReadAsStringAsync();
@@ -248,13 +247,9 @@ namespace {{ spec.title | caseUcfirst }}
248247

249248
return (dict as T)!;
250249
}
251-
else if (isBytes)
252-
{
253-
return ((await response.Content.ReadAsByteArrayAsync()) as T)!;
254-
}
255250
else
256251
{
257-
return default!;
252+
return ((await response.Content.ReadAsByteArrayAsync()) as T)!;
258253
}
259254
}
260255

0 commit comments

Comments
 (0)