Skip to content

Commit

Permalink
Merge pull request #229 from desci-labs/draft-nodes-cover
Browse files Browse the repository at this point in the history
Resolve NodeCover from radar api
  • Loading branch information
hubsmoke authored Feb 26, 2024
2 parents 7cc914a + b80336a commit a557642
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion desci-server/src/controllers/communities/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,21 @@ export const resolveLatestNode = async (radar: Partial<NodeRadar>) => {
uuid,
isDeleted: false,
},
select: {
id: true,
manifestUrl: true,
ownerId: true,
uuid: true,
title: true,
NodeCover: true,
},
});

if (!discovery) {
logger.warn({ uuid }, 'uuid not found');
}

const selectAttributes = ['manifestUrl', 'ownerId', 'title'];
const selectAttributes = ['manifestUrl', 'ownerId', 'title', 'NodeCover'];
const node: Partial<Node & { versions: number }> = _.pick(discovery, selectAttributes);
const publisedVersions =
(await prisma.$queryRaw`SELECT * from "NodeVersion" where "nodeId" = ${discovery.id} AND "transactionId" IS NOT NULL ORDER BY "createdAt" DESC`) as NodeVersion[];
Expand Down

0 comments on commit a557642

Please sign in to comment.