mise a jour next 16 et user

This commit is contained in:
Biqoz
2025-12-15 13:23:49 +01:00
parent 1a590d60c3
commit fff81fda4f
7 changed files with 658 additions and 177 deletions

View File

@@ -133,6 +133,13 @@ export async function GET(
}
}
// Gestion spéciale pour balances - le champ user est stocké comme ObjectId
if (collection === "balances") {
if (filter.user && typeof filter.user === "string" && ObjectId.isValid(filter.user)) {
filter.user = new ObjectId(filter.user);
}
}
const db = await getDatabase();
const skip = (page - 1) * limit;