From e22a7953265d4b6e29e22c432552259f85bd693f Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Wed, 9 Jul 2025 11:06:25 -0600 Subject: [PATCH] Add additinal fixes --- apps/web/src/api/buster_rest/security/queryRequests.ts | 6 +++--- apps/web/src/api/buster_rest/security/requests.ts | 2 +- .../components/features/security/WorkspaceRestrictions.tsx | 2 +- packages/server-shared/src/teams/teams.types.ts | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/web/src/api/buster_rest/security/queryRequests.ts b/apps/web/src/api/buster_rest/security/queryRequests.ts index 34d681a7c..8c10cbe29 100644 --- a/apps/web/src/api/buster_rest/security/queryRequests.ts +++ b/apps/web/src/api/buster_rest/security/queryRequests.ts @@ -88,13 +88,13 @@ export const useAddApprovedDomain = () => { onMutate: (variables) => { queryClient.setQueryData(securityQueryKeys.securityApprovedDomains.queryKey, (prev) => { if (!prev) return prev; - return { + return [ ...prev, ...variables.domains.map((domain) => ({ domain, created_at: new Date().toISOString() - })) - } satisfies GetApprovedDomainsResponse; + })) satisfies GetApprovedDomainsResponse + ] satisfies GetApprovedDomainsResponse; }); }, onSuccess: (data) => { diff --git a/apps/web/src/api/buster_rest/security/requests.ts b/apps/web/src/api/buster_rest/security/requests.ts index 92f135152..fcefb69af 100644 --- a/apps/web/src/api/buster_rest/security/requests.ts +++ b/apps/web/src/api/buster_rest/security/requests.ts @@ -46,7 +46,7 @@ export const addApprovedDomain = async (request: AddApprovedDomainRequest) => { export const removeApprovedDomain = async (request: RemoveApprovedDomainRequest) => { return await mainApiV2 .delete('/security/approved-domains', { - data: request + params: request }) .then((res) => res.data); }; diff --git a/apps/web/src/components/features/security/WorkspaceRestrictions.tsx b/apps/web/src/components/features/security/WorkspaceRestrictions.tsx index 03718a6a6..65401da93 100644 --- a/apps/web/src/components/features/security/WorkspaceRestrictions.tsx +++ b/apps/web/src/components/features/security/WorkspaceRestrictions.tsx @@ -41,7 +41,7 @@ export const WorkspaceRestrictions = React.memo(() => { updateWorkspaceSettings={updateWorkspaceSettings} /> ], - [workspaceSettings?.restrict_new_user_invitations] + [workspaceSettings] ); return ( diff --git a/packages/server-shared/src/teams/teams.types.ts b/packages/server-shared/src/teams/teams.types.ts index 0f8db844e..538176cd9 100644 --- a/packages/server-shared/src/teams/teams.types.ts +++ b/packages/server-shared/src/teams/teams.types.ts @@ -1,4 +1,4 @@ -import type { teamRoleEnum } from '@buster/database'; +import type { teamRoleEnum } from '@buster/database'; //we import as type to avoid postgres dependency in the frontend ☹️ import { z } from 'zod/v4'; import { SharingSettingSchema } from '../user/sharing-setting.types';