const disputedMatches = await db.query.active_members.findMany({
where: (active_members, { eq }) => eq(active_members.user_id, id),
with: {
match: {
where: (matches, { eq }) => eq(matches.status, 'DISPUTED'),
with: {
creatorTeam: true,
acceptorTeam: true,
game: true
}
}
}
});
const disputedMatches = await db.query.active_members.findMany({
where: (active_members, { eq }) => eq(active_members.user_id, id),
with: {
match: {
where: (matches, { eq }) => eq(matches.status, 'DISPUTED'),
with: {
creatorTeam: true,
acceptorTeam: true,
game: true
}
}
}
});