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: {
deletedAt: null,
teams: {
some: {
OR: [
{
ownerId: userId
},
{
members: {
some: {
memberId: userId
OR: [
{
teams: {
some: {
OR: [
{
ownerId: userId
},
{
members: {
some: {
memberId: userId
}
}
}
}
]
}
]
}
},
{
creatorId: userId
},
{
members: {
some: {
memberId: userId
}
}
}
}
]
}
});
}