From d6b6ac6dabb880b84a44668c68fb50a14efe50c0 Mon Sep 17 00:00:00 2001 From: DaneEveritt Date: Mon, 4 Jul 2022 18:13:15 -0400 Subject: [PATCH] Key activity log cache to the server instance, not the user instance. --- resources/scripts/api/server/activity.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/resources/scripts/api/server/activity.ts b/resources/scripts/api/server/activity.ts index cd28bcf02..76ca9e97c 100644 --- a/resources/scripts/api/server/activity.ts +++ b/resources/scripts/api/server/activity.ts @@ -1,4 +1,3 @@ -import useUserSWRContentKey from '@/plugins/useUserSWRContentKey'; import useSWR, { ConfigInterface, responseInterface } from 'swr'; import { ActivityLog, Transformers } from '@definitions/user'; import { AxiosError } from 'axios'; @@ -13,11 +12,10 @@ const useActivityLogs = ( filters?: ActivityLogFilters, config?: ConfigInterface, AxiosError> ): responseInterface, AxiosError> => { - const uuid = ServerContext.useStoreState((state) => state.server.data?.uuid); - const key = useUserSWRContentKey(['server', 'activity', useFilteredObject(filters || {})]); + const uuid = ServerContext.useStoreState((state) => state.server.data!.uuid); return useSWR>( - key, + ['server:activty', uuid, useFilteredObject(filters || {})], async () => { const { data } = await http.get(`/api/client/servers/${uuid}/activity`, { params: {