From 0555369e9533d210b935c13213b48db1e8a76782 Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Sat, 12 Jul 2025 16:28:17 -0600 Subject: [PATCH] organization camelcase update --- apps/api/libs/database/src/models.rs | 1 + .../src/context/BusterReactQuery/BusterReactQueryAndApi.tsx | 5 ++++- packages/access-controls/src/access-controls.test.ts | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/api/libs/database/src/models.rs b/apps/api/libs/database/src/models.rs index c19d1bb22..20aa970f3 100644 --- a/apps/api/libs/database/src/models.rs +++ b/apps/api/libs/database/src/models.rs @@ -335,6 +335,7 @@ pub struct Collection { #[derive(Queryable, Insertable, Identifiable, Debug, Clone, Serialize, Deserialize)] #[diesel(table_name = organizations)] +#[serde(rename_all = "camelCase")] pub struct Organization { pub id: Uuid, pub name: String, diff --git a/apps/web/src/context/BusterReactQuery/BusterReactQueryAndApi.tsx b/apps/web/src/context/BusterReactQuery/BusterReactQueryAndApi.tsx index 3789d29f5..832570e89 100644 --- a/apps/web/src/context/BusterReactQuery/BusterReactQueryAndApi.tsx +++ b/apps/web/src/context/BusterReactQuery/BusterReactQueryAndApi.tsx @@ -13,6 +13,9 @@ import { useSupabaseContext } from '../Supabase/SupabaseContextProvider'; import { persistOptions } from './createPersister'; import { getQueryClient } from './getQueryClient'; +const ENABLE_TANSTACK_PANEL = + process.env.NEXT_ENABLE_TANSTACK_PANEL === 'true' || process.env.NODE_ENV === 'development'; + const ReactQueryDevtools = dynamic( () => import('@tanstack/react-query-devtools').then((d) => ({ @@ -66,7 +69,7 @@ export const BusterReactQueryProvider = ({ children }: { children: React.ReactNo e.stopPropagation(); setIsDevToolsOpen((prev) => !prev); }, - { enabled: process.env.NEXT_ENABLE_TANSTACK_PANEL === 'true' } + { enabled: ENABLE_TANSTACK_PANEL } ); return ( diff --git a/packages/access-controls/src/access-controls.test.ts b/packages/access-controls/src/access-controls.test.ts index 645f6090e..59f069c66 100644 --- a/packages/access-controls/src/access-controls.test.ts +++ b/packages/access-controls/src/access-controls.test.ts @@ -16,9 +16,9 @@ const createChainableMock = () => { 'selectDistinct', ]; - methods.forEach((method) => { + for (const method of methods) { mock[method] = vi.fn().mockReturnValue(mock); - }); + } // Override specific methods that should return data mock._resolveWith = (data: any) => {