Skip to content

Commit

Permalink
fix fetching farcaster users
Browse files Browse the repository at this point in the history
  • Loading branch information
RamRamez committed Nov 11, 2024
1 parent d343d33 commit 426a28b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/neynar/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ const findMaxiUsers = async () => {
(category) => category.id,
);

const usersWithFarcaster = await prisma.user.findMany({
const farcasterConnections = await prisma.farcasterConnection.findMany({
where: {
farcasterConnection: {
isNot: null,
thankYouCastSent: false,
},
thankYouCastSent: false,
},
select: {
id: true,
userId: true,
},
});
const userIdsWithFarcaster = usersWithFarcaster.map((user) => user.id);

const userIdsWithFarcaster = farcasterConnections.map(
(connection) => connection.userId,
);

// Find users who have delegated or attested to all categories (Collection + Budget)
const maxiUsers = await prisma.user.findMany({
Expand Down

0 comments on commit 426a28b

Please sign in to comment.