More bugs, some updates where not using set

This commit is contained in:
Carlos Mesquita
2024-09-23 01:09:34 +01:00
parent 71bac76c3a
commit 07c9074d15

View File

@@ -40,6 +40,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
await db.collection("stats").updateOne(
{ id: (req.body as Body).id },
{
$set: {
id: (req.body as Body).id,
solutions,
score: {
@@ -48,6 +49,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
missing: 0,
},
isDisabled: false,
}
},
{ upsert: true },
);