More mongodb migration bugs, remove _id from find, and a stat endpoint firebase leftover bug
This commit is contained in:
@@ -16,5 +16,5 @@ async function GET(req: NextApiRequest, res: NextApiResponse) {
|
||||
const snapshot = await db.collection("stats").findOne({ id: id as string});
|
||||
if (!snapshot) return res.status(404).json({id: id as string});
|
||||
|
||||
res.status(200).json({...snapshot.data(), id: snapshot.id});
|
||||
res.status(200).json({...snapshot, id: snapshot.id});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user