MCPcopy Index your code
hub / github.com/CapSoftware/Cap / createCustomDomainQuery

Function createCustomDomainQuery

apps/desktop/src/utils/queries.ts:332–351  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

330}
331
332export function createCustomDomainQuery() {
333 return useQuery(() => ({
334 queryKey: ["customDomain"] as const,
335 queryFn: async () => {
336 try {
337 const auth = await authStore.get();
338 if (!auth) return { custom_domain: null, domain_verified: null };
339 const response = await orgCustomDomainClient.getOrgCustomDomain({
340 headers: await protectedHeaders(),
341 });
342 if (response.status === 200) return response.body;
343 } catch (error) {
344 console.error("Error fetching custom domain:", error);
345 return { custom_domain: null, domain_verified: null };
346 }
347 },
348 refetchOnMount: true,
349 refetchOnWindowFocus: true,
350 }));
351}
352
353export function createOrganizationsQuery() {
354 const auth = authStore.createQuery();

Callers 1

context.tsFile · 0.90

Calls 1

protectedHeadersFunction · 0.90

Tested by

no test coverage detected