From 4b9927bbe88a64a5fc8133042db13031e199a2db Mon Sep 17 00:00:00 2001 From: babypatrick100 <151981151+babypatrick100@users.noreply.github.com> Date: Sat, 31 Aug 2024 14:51:08 -0400 Subject: [PATCH 1/2] Fix missing `ProfileVersionQuery` method for mock profile stores --- ProfileService.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ProfileService.lua b/ProfileService.lua index 47bcb4c..52a97aa 100644 --- a/ProfileService.lua +++ b/ProfileService.lua @@ -2231,8 +2231,8 @@ function ProfileService.GetProfileStore(profile_store_index, profile_template) - ViewProfileAsync = function(_, profile_key, version) return profile_store:ViewProfileAsync(profile_key, version, UseMockTag) end, - FindProfileVersionAsync = function(_, profile_key, sort_direction, min_date, max_date) - return profile_store:FindProfileVersionAsync(profile_key, sort_direction, min_date, max_date, UseMockTag) + ProfileVersionQuery = function(_, profile_key, sort_direction, min_date, max_date) + return profile_store:ProfileVersionQuery(profile_key, sort_direction, min_date, max_date, UseMockTag) end, WipeProfileAsync = function(_, profile_key) return profile_store:WipeProfileAsync(profile_key, UseMockTag) @@ -2411,4 +2411,4 @@ task.spawn(function() ) end) -return ProfileService \ No newline at end of file +return ProfileService From c75d2cd8e7aea2c74f3eb64285613ff03f427cc9 Mon Sep 17 00:00:00 2001 From: babypatrick100 <151981151+babypatrick100@users.noreply.github.com> Date: Sat, 31 Aug 2024 14:57:35 -0400 Subject: [PATCH 2/2] Update ProfileService.lua --- ProfileService.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ProfileService.lua b/ProfileService.lua index 52a97aa..79e974c 100644 --- a/ProfileService.lua +++ b/ProfileService.lua @@ -2100,16 +2100,12 @@ function ProfileStore:ProfileVersionQuery(profile_key, sort_direction, min_date, error("[ProfileService]: Invalid profile_key") end - if ProfileService.ServiceLocked == true then + if ProfileService.ServiceLocked == true or _use_mock == UseMockTag or UseMockDataStore == true then return setmetatable({}, ProfileVersionQuery) -- Silently fail :Next() requests end WaitForPendingProfileStore(self) - if _use_mock == UseMockTag or UseMockDataStore == true then - error("[ProfileService]: :ProfileVersionQuery() is not supported in mock mode") - end - -- Type check: if sort_direction ~= nil and (typeof(sort_direction) ~= "EnumItem" or sort_direction.EnumType ~= Enum.SortDirection) then