From 803c93a1b410c6e18ce11f71bf580c432e83f69d Mon Sep 17 00:00:00 2001 From: Scott <50155740+ScottMktn@users.noreply.github.com> Date: Tue, 13 Jun 2023 14:29:39 -0700 Subject: [PATCH] clickhouse-request-count (#490) --- web/pages/api/user/checkOnboarded.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web/pages/api/user/checkOnboarded.ts b/web/pages/api/user/checkOnboarded.ts index e50ad60ca0..4d98d7f7c5 100644 --- a/web/pages/api/user/checkOnboarded.ts +++ b/web/pages/api/user/checkOnboarded.ts @@ -1,4 +1,7 @@ -import { getRequestCount } from "../../../lib/api/request/request"; +import { + getRequestCount, + getRequestCountClickhouse, +} from "../../../lib/api/request/request"; import { SupabaseClient } from "@supabase/supabase-js"; import { @@ -13,7 +16,7 @@ async function checkAndUpdateOrgs( supabaseClient: SupabaseClient ): Promise { for (const org of orgs) { - const count = (await getRequestCount(org.id, "all")).data ?? 0; + const count = (await getRequestCountClickhouse(org.id, "all")).data ?? 0; if (count > 0) { await supabaseClient .from("organization")