Add additinal fixes

This commit is contained in:
Nate Kelley 2025-07-09 11:06:25 -06:00
parent 26d77fef53
commit e22a795326
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
4 changed files with 6 additions and 6 deletions

View File

@ -88,13 +88,13 @@ export const useAddApprovedDomain = () => {
onMutate: (variables) => { onMutate: (variables) => {
queryClient.setQueryData(securityQueryKeys.securityApprovedDomains.queryKey, (prev) => { queryClient.setQueryData(securityQueryKeys.securityApprovedDomains.queryKey, (prev) => {
if (!prev) return prev; if (!prev) return prev;
return { return [
...prev, ...prev,
...variables.domains.map((domain) => ({ ...variables.domains.map((domain) => ({
domain, domain,
created_at: new Date().toISOString() created_at: new Date().toISOString()
})) })) satisfies GetApprovedDomainsResponse
} satisfies GetApprovedDomainsResponse; ] satisfies GetApprovedDomainsResponse;
}); });
}, },
onSuccess: (data) => { onSuccess: (data) => {

View File

@ -46,7 +46,7 @@ export const addApprovedDomain = async (request: AddApprovedDomainRequest) => {
export const removeApprovedDomain = async (request: RemoveApprovedDomainRequest) => { export const removeApprovedDomain = async (request: RemoveApprovedDomainRequest) => {
return await mainApiV2 return await mainApiV2
.delete<GetApprovedDomainsResponse>('/security/approved-domains', { .delete<GetApprovedDomainsResponse>('/security/approved-domains', {
data: request params: request
}) })
.then((res) => res.data); .then((res) => res.data);
}; };

View File

@ -41,7 +41,7 @@ export const WorkspaceRestrictions = React.memo(() => {
updateWorkspaceSettings={updateWorkspaceSettings} updateWorkspaceSettings={updateWorkspaceSettings}
/> />
], ],
[workspaceSettings?.restrict_new_user_invitations] [workspaceSettings]
); );
return ( return (

View File

@ -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 { z } from 'zod/v4';
import { SharingSettingSchema } from '../user/sharing-setting.types'; import { SharingSettingSchema } from '../user/sharing-setting.types';