From 7de7fea391ad32ed49371fb0ffbfa93209e19827 Mon Sep 17 00:00:00 2001 From: Timothee Legros Date: Fri, 5 Jan 2024 19:49:51 +0100 Subject: [PATCH] type fixes --- .../test/integration/api/createReactions.spec.ts | 2 +- .../commonwealth/test/integration/api/linking.spec.ts | 8 ++++---- .../test/integration/api/subscriptions.spec.ts | 2 +- .../test/integration/api/thread.update.spec.ts | 2 +- packages/commonwealth/test/integration/api/topics.spec.ts | 2 +- .../test/integration/api/userDashboard.spec.ts | 4 ++-- packages/commonwealth/test/util/resetDatabase.ts | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/commonwealth/test/integration/api/createReactions.spec.ts b/packages/commonwealth/test/integration/api/createReactions.spec.ts index 0332ef31391..8e2209fda9f 100644 --- a/packages/commonwealth/test/integration/api/createReactions.spec.ts +++ b/packages/commonwealth/test/integration/api/createReactions.spec.ts @@ -54,7 +54,7 @@ describe('createReaction Integration Tests', () => { const topic = await models.Topic.findOne({ where: { - chain_id: communityId, + community_id: communityId, group_ids: [], }, }); diff --git a/packages/commonwealth/test/integration/api/linking.spec.ts b/packages/commonwealth/test/integration/api/linking.spec.ts index 0b3b3e2e953..9cf4d701d47 100644 --- a/packages/commonwealth/test/integration/api/linking.spec.ts +++ b/packages/commonwealth/test/integration/api/linking.spec.ts @@ -4,7 +4,7 @@ import chaiHttp from 'chai-http'; import 'chai/register-should'; import jwt from 'jsonwebtoken'; import { JWT_SECRET } from 'server/config'; -import { LinkSource, ThreadInstance } from 'server/models/thread'; +import { LinkSource, ThreadAttributes } from 'server/models/thread'; import { Errors } from 'server/util/linkingValidationHelper'; import * as modelUtils from 'test/util/modelUtils'; import { resetDatabase } from '../../../server-test'; @@ -34,8 +34,8 @@ describe('Linking Tests', () => { session: Session; sign: (payload: ActionPayload) => string; }, - thread1: ThreadInstance, - thread2: ThreadInstance; + thread1: ThreadAttributes, + thread2: ThreadAttributes; const link1 = { source: LinkSource.Snapshot, @@ -52,7 +52,7 @@ describe('Linking Tests', () => { const topic = await models.Topic.findOne({ where: { - chain_id: chain, + community_id: chain, group_ids: [], }, }); diff --git a/packages/commonwealth/test/integration/api/subscriptions.spec.ts b/packages/commonwealth/test/integration/api/subscriptions.spec.ts index 5f8e30fa420..8662d41a754 100644 --- a/packages/commonwealth/test/integration/api/subscriptions.spec.ts +++ b/packages/commonwealth/test/integration/api/subscriptions.spec.ts @@ -34,7 +34,7 @@ describe('Subscriptions Tests', () => { const topic = await models.Topic.findOne({ where: { - chain_id: chain, + community_id: chain, group_ids: [], }, }); diff --git a/packages/commonwealth/test/integration/api/thread.update.spec.ts b/packages/commonwealth/test/integration/api/thread.update.spec.ts index d2eceae9e6f..b636f8ccbf8 100644 --- a/packages/commonwealth/test/integration/api/thread.update.spec.ts +++ b/packages/commonwealth/test/integration/api/thread.update.spec.ts @@ -58,7 +58,7 @@ describe('Thread Patch Update', () => { const topic = await models.Topic.findOne({ where: { - chain_id: chain, + community_id: chain, group_ids: [], }, }); diff --git a/packages/commonwealth/test/integration/api/topics.spec.ts b/packages/commonwealth/test/integration/api/topics.spec.ts index 03379eba6be..e4448188e0e 100644 --- a/packages/commonwealth/test/integration/api/topics.spec.ts +++ b/packages/commonwealth/test/integration/api/topics.spec.ts @@ -64,7 +64,7 @@ describe('Topic Tests', () => { const topicInstance = await models.Topic.findOne({ where: { - chain_id: chain, + community_id: chain, group_ids: [], }, }); diff --git a/packages/commonwealth/test/integration/api/userDashboard.spec.ts b/packages/commonwealth/test/integration/api/userDashboard.spec.ts index 2ce915697da..833531df562 100644 --- a/packages/commonwealth/test/integration/api/userDashboard.spec.ts +++ b/packages/commonwealth/test/integration/api/userDashboard.spec.ts @@ -42,7 +42,7 @@ describe('User Dashboard API', () => { const topic = await models.Topic.findOne({ where: { - chain_id: chain, + community_id: chain, group_ids: [], }, }); @@ -51,7 +51,7 @@ describe('User Dashboard API', () => { const topic2 = await models.Topic.create({ name: 'Test Topic', description: 'A topic made for testing', - chain_id: chain2, + community_id: chain2, }); topicId2 = topic2.id; diff --git a/packages/commonwealth/test/util/resetDatabase.ts b/packages/commonwealth/test/util/resetDatabase.ts index 0c1953958e4..30edd8eeba0 100644 --- a/packages/commonwealth/test/util/resetDatabase.ts +++ b/packages/commonwealth/test/util/resetDatabase.ts @@ -315,7 +315,7 @@ export const resetDatabase = (debug = false): Promise => { await models.Topic.create({ name: 'Test Topic', description: 'A topic made for testing', - chain_id: 'ethereum', + community_id: 'ethereum', }); if (debug) log.info('Database reset!');