Hi how can we get documents based on a
export const getUsers = query({
args: {
userIds: v.array(v.string()), //list of userId's that I want to check and retrieve
},
handler: async (ctx, args) => {
const users = await ctx.db
.query('users').filter((q) => q.eq(q.field('userId'), args.userIds)) //get all the users, who match the userID
.collect();
return users;
},
});
