Skip to content

Commit 426a28b

Browse files
committed
fix fetching farcaster users
1 parent d343d33 commit 426a28b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/neynar/utils.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,18 @@ const findMaxiUsers = async () => {
2525
(category) => category.id,
2626
);
2727

28-
const usersWithFarcaster = await prisma.user.findMany({
28+
const farcasterConnections = await prisma.farcasterConnection.findMany({
2929
where: {
30-
farcasterConnection: {
31-
isNot: null,
32-
thankYouCastSent: false,
33-
},
30+
thankYouCastSent: false,
3431
},
3532
select: {
36-
id: true,
33+
userId: true,
3734
},
3835
});
39-
const userIdsWithFarcaster = usersWithFarcaster.map((user) => user.id);
36+
37+
const userIdsWithFarcaster = farcasterConnections.map(
38+
(connection) => connection.userId,
39+
);
4040

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

0 commit comments

Comments
 (0)