From 0522a150858ed21d0db535fc9f8b7d285edeed61 Mon Sep 17 00:00:00 2001 From: thanhtran Date: Sat, 7 Dec 2024 23:54:51 -0800 Subject: [PATCH] fix load customer via token --- src/Web/Grand.Web.Common/WorkContext.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Web/Grand.Web.Common/WorkContext.cs b/src/Web/Grand.Web.Common/WorkContext.cs index 80e35d7ef..0d2588bfc 100644 --- a/src/Web/Grand.Web.Common/WorkContext.cs +++ b/src/Web/Grand.Web.Common/WorkContext.cs @@ -173,10 +173,10 @@ public virtual async Task SetCurrentCustomer() customer = await GetAuthenticatedCustomer(); if (customer != null) return _cachedCustomer = customer; - customer = await GetGuestCustomer(); + customer = await GetApiUserCustomer(); if (customer != null) return _cachedCustomer = customer; - customer = await GetApiUserCustomer(); + customer = await GetGuestCustomer(); if (customer != null) return _cachedCustomer = customer; customer = await GetSearchEngineCustomer();