Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions ProfileService.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -2231,8 +2227,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)
Expand Down Expand Up @@ -2411,4 +2407,4 @@ task.spawn(function()
)
end)

return ProfileService
return ProfileService