Skip to content

Commit

Permalink
fix: added id check to db-seach (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
malmen237 authored Oct 17, 2024
1 parent 838e449 commit 110b8bd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/api/manager/multiviews.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ export async function putMultiviewLayout(
const db = await getDatabase();
const collection = db.collection('multiviews');
const editLayout = await collection.findOne({
_id: new ObjectId(newMultiviewLayout._id),
name: newMultiviewLayout.name
});

const newMultiviewLayoutWithoutID = { ...newMultiviewLayout };
delete newMultiviewLayoutWithoutID._id;

Expand Down

0 comments on commit 110b8bd

Please sign in to comment.