More bugs, some updates where not using set
This commit is contained in:
@@ -40,6 +40,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
await db.collection("stats").updateOne(
|
await db.collection("stats").updateOne(
|
||||||
{ id: (req.body as Body).id },
|
{ id: (req.body as Body).id },
|
||||||
{
|
{
|
||||||
|
$set: {
|
||||||
id: (req.body as Body).id,
|
id: (req.body as Body).id,
|
||||||
solutions,
|
solutions,
|
||||||
score: {
|
score: {
|
||||||
@@ -48,6 +49,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
missing: 0,
|
missing: 0,
|
||||||
},
|
},
|
||||||
isDisabled: false,
|
isDisabled: false,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{ upsert: true },
|
{ upsert: true },
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user