From 476173920d6b1682d1d09e3422b4cc181c49add3 Mon Sep 17 00:00:00 2001 From: "hualin.zhu" Date: Sat, 14 Dec 2024 16:24:38 +0800 Subject: [PATCH] commit --- src/CleanAspire.ClientApp/Client/.kiota/workspace.json | 5 +++++ .../Services/Proxies/ProductServiceProxy.cs | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 src/CleanAspire.ClientApp/Client/.kiota/workspace.json diff --git a/src/CleanAspire.ClientApp/Client/.kiota/workspace.json b/src/CleanAspire.ClientApp/Client/.kiota/workspace.json new file mode 100644 index 0000000..3ce81de --- /dev/null +++ b/src/CleanAspire.ClientApp/Client/.kiota/workspace.json @@ -0,0 +1,5 @@ +{ + "version": "1.0.0", + "clients": {}, + "plugins": {} +} \ No newline at end of file diff --git a/src/CleanAspire.ClientApp/Services/Proxies/ProductServiceProxy.cs b/src/CleanAspire.ClientApp/Services/Proxies/ProductServiceProxy.cs index 7569403..16f2651 100644 --- a/src/CleanAspire.ClientApp/Services/Proxies/ProductServiceProxy.cs +++ b/src/CleanAspire.ClientApp/Services/Proxies/ProductServiceProxy.cs @@ -14,7 +14,8 @@ public class ProductServiceProxy(ApiClient apiClient, IndexedDbCache indexedDb, public async Task GetProductsAsync(ProductsWithPaginationQuery query) { var cacheKey = GenerateCacheKey(query); - if (await onlineStatus.GetOnlineStatusAsync()) + var online = await onlineStatus.GetOnlineStatusAsync(); + if (online) { var apiResult = await apiClient.Products.Pagination.PostAsync(query); if (apiResult != null && offlineMode.Enabled)