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) => {
|
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) => {
|
||||||
|
|
|
@ -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);
|
||||||
};
|
};
|
||||||
|
|
|
@ -41,7 +41,7 @@ export const WorkspaceRestrictions = React.memo(() => {
|
||||||
updateWorkspaceSettings={updateWorkspaceSettings}
|
updateWorkspaceSettings={updateWorkspaceSettings}
|
||||||
/>
|
/>
|
||||||
],
|
],
|
||||||
[workspaceSettings?.restrict_new_user_invitations]
|
[workspaceSettings]
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
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 { z } from 'zod/v4';
|
||||||
import { SharingSettingSchema } from '../user/sharing-setting.types';
|
import { SharingSettingSchema } from '../user/sharing-setting.types';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue