Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ export function createPollingChangeDetection(

const getAllRecords = async (): Promise<Changes> => {
const dripListsSql = (schema: DbSchema) => `
SELECT "id", "name", "description", "ownerAddress", "ownerAccountId", "isVisible", '${schema}' AS chain
FROM ${schema}."DripLists"
WHERE "isVisible" = TRUE
SELECT "account_id" as "id", "name", "description", "owner_address" as "ownerAddress", "owner_account_id" as "ownerAccountId", "is_visible" as "isVisible", '${schema}' AS chain
FROM ${schema}."drip_lists"
WHERE "is_visible" = TRUE
`;

const projectsSql = (schema: DbSchema) => `
SELECT "id", "name", "description", "ownerAddress", "ownerAccountId", "url", "avatarCid", "emoji", "color", "isVisible", "verificationStatus"::TEXT, '${schema}' AS chain
FROM ${schema}."GitProjects"
SELECT "account_id" as "id", "name", "owner_address" as "ownerAddress", "owner_account_id" as "ownerAccountId", "url", "avatar_cid" as "avatarCid", "emoji", "color", "is_visible" as "isVisible", "verification_status"::TEXT as "verificationStatus", '${schema}' AS chain
FROM ${schema}."projects"
`;

const dripListsQueries = schemas.map(chain => dripListsSql(chain));
Expand Down
3 changes: 1 addition & 2 deletions src/synchronizer/meilisearch/changeDetection/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export type Project = {
id: string;
url: string;
name: string;
description: string;
ownerAddress: string;
ownerAccountId: string;
avatarCid: string;
Expand All @@ -30,7 +29,7 @@ export type Project = {
ownerName: string;
repoName: string;
isVisible: boolean;
verificationStatus: 'Claimed' | 'Unclaimed';
verificationStatus: 'claimed' | 'unclaimed' | 'pending_metadata';
};

export type Changes = {
Expand Down
3 changes: 0 additions & 3 deletions src/synchronizer/meilisearch/createMeiliSearchSynchronizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export function createMeiliSearchSynchronizer(
id: p.id,
name: p.name,
type: 'project',
description: p.description,
ownerAddress: p.ownerAddress,
ownerAccountId: p.ownerAccountId,
url: p.url,
Expand Down Expand Up @@ -158,7 +157,6 @@ export function createMeiliSearchSynchronizer(
searchableAttributes: [
'id',
'name',
'description',
'url',
'ownerAddress',
'ownerAccountId',
Expand All @@ -182,7 +180,6 @@ export function createMeiliSearchSynchronizer(
'id',
'name',
'type',
'description',
'ownerAddress',
'ownerAccountId',
'url',
Expand Down