We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3bd56ec commit 16e39f4Copy full SHA for 16e39f4
apps/sim/hooks/queries/organization.ts
@@ -47,22 +47,6 @@ export function useOrganizations() {
47
})
48
}
49
50
-/**
51
- * Fetch organizations where user is owner/admin directly from DB
52
- * This bypasses session's activeOrganizationId for reliable role checking
53
- */
54
-export function useUserOwnedOrganizations() {
55
- return useQuery({
56
- queryKey: ['user-owned-organizations'],
57
- queryFn: async () => {
58
- const res = await fetch('/api/organizations')
59
- if (!res.ok) return { organizations: [] }
60
- return res.json()
61
- },
62
- staleTime: 0, // Always refetch to ensure fresh org membership data
63
- })
64
-}
65
-
66
/**
67
* Fetch a specific organization by ID
68
*/
0 commit comments