Include administrated hunts in home

This commit is contained in:
2025-09-15 15:45:07 +02:00
parent 165e3d1559
commit 1c7d09bfcb
+27 -13
View File
@@ -34,22 +34,36 @@ async function getOwnHunts(userId: number | undefined) {
}, },
where: { where: {
deletedAt: null, deletedAt: null,
teams: { OR: [
some: { {
OR: [ teams: {
{ some: {
ownerId: userId OR: [
}, {
{ ownerId: userId
members: { },
some: { {
memberId: userId members: {
some: {
memberId: userId
}
}
} }
} ]
} }
] }
},
{
creatorId: userId
},
{
members: {
some: {
memberId: userId
}
}
} }
} ]
} }
}); });
} }