update query keys to include org id, preventing stale data after organization switch

This commit is contained in:
Gregor Vostrak
2026-02-18 12:53:22 +01:00
parent 1afc16573a
commit 0fc325363d
9 changed files with 15 additions and 15 deletions

View File

@@ -8,7 +8,7 @@ export function useProjectsQuery() {
const queryClient = useQueryClient();
const query = useQuery({
queryKey: ['projects'],
queryKey: computed(() => ['projects', getCurrentOrganizationId()]),
queryFn: async () => {
const organizationId = getCurrentOrganizationId();
if (!organizationId) throw new Error('No organization');