From e2c665d19ad54e8fd878d8722e467185923fb5a8 Mon Sep 17 00:00:00 2001 From: Aditya Oberai Date: Wed, 31 Jan 2024 16:47:24 +0530 Subject: [PATCH] Fix byte array check --- templates/dotnet/src/Appwrite/Client.cs.twig | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/templates/dotnet/src/Appwrite/Client.cs.twig b/templates/dotnet/src/Appwrite/Client.cs.twig index 0f11ee45f..108ca492e 100644 --- a/templates/dotnet/src/Appwrite/Client.cs.twig +++ b/templates/dotnet/src/Appwrite/Client.cs.twig @@ -221,7 +221,6 @@ namespace {{ spec.title | caseUcfirst }} .FirstOrDefault() ?? string.Empty; var isJson = contentType.Contains("application/json"); - var isBytes = contentType.Contains("application/octet-stream"); if (code >= 400) { var message = await response.Content.ReadAsStringAsync(); @@ -248,13 +247,9 @@ namespace {{ spec.title | caseUcfirst }} return (dict as T)!; } - else if (isBytes) - { - return ((await response.Content.ReadAsByteArrayAsync()) as T)!; - } else { - return default!; + return ((await response.Content.ReadAsByteArrayAsync()) as T)!; } }