mirror of https://github.com/buster-so/buster.git
Add additinal fixes
This commit is contained in:
parent
26d77fef53
commit
e22a795326
|
@ -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) => {
|
||||
|
|
|
@ -46,7 +46,7 @@ export const addApprovedDomain = async (request: AddApprovedDomainRequest) => {
|
|||
export const removeApprovedDomain = async (request: RemoveApprovedDomainRequest) => {
|
||||
return await mainApiV2
|
||||
.delete<GetApprovedDomainsResponse>('/security/approved-domains', {
|
||||
data: request
|
||||
params: request
|
||||
})
|
||||
.then((res) => res.data);
|
||||
};
|
||||
|
|
|
@ -41,7 +41,7 @@ export const WorkspaceRestrictions = React.memo(() => {
|
|||
updateWorkspaceSettings={updateWorkspaceSettings}
|
||||
/>
|
||||
],
|
||||
[workspaceSettings?.restrict_new_user_invitations]
|
||||
[workspaceSettings]
|
||||
);
|
||||
|
||||
return (
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
Loading…
Reference in New Issue