From 1f7835162de13f42fdd769fc2679d7c853d2adb6 Mon Sep 17 00:00:00 2001 From: PsicoThePato Date: Wed, 16 Oct 2024 20:48:52 -0300 Subject: [PATCH] :adhesive_bandage: Upserting isWhitelisted --- apps/commune-worker/src/db/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/commune-worker/src/db/index.ts b/apps/commune-worker/src/db/index.ts index 75bdf617..af9d723a 100644 --- a/apps/commune-worker/src/db/index.ts +++ b/apps/commune-worker/src/db/index.ts @@ -1,6 +1,6 @@ import type { SQL, Table } from "@commune-ts/db"; import type { GovernanceModeType } from "@commune-ts/types"; -import { getTableColumns, sql } from "@commune-ts/db"; +import { getTableColumns, is, sql } from "@commune-ts/db"; import { db } from "@commune-ts/db/client"; import { cadreSchema, @@ -142,6 +142,7 @@ export async function upsertModuleData(modules: Module[]) { totalStaked: m.totalStaked, totalStakers: m.totalStakers, totalRewards: m.totalRewards, + isWhitelisted: m.isWhitelisted, })), ) .onConflictDoUpdate({ @@ -159,6 +160,7 @@ export async function upsertModuleData(modules: Module[]) { "totalStaked", "totalStakers", "totalRewards", + "isWhitelisted" ]), }) .execute();