Merge pull request #11 from DorianNiemiecSVRJS/main
Fix vulnerability deletion API.
This commit is contained in:
commit
f46d0f00a9
1 changed files with 2 additions and 2 deletions
|
@ -6,8 +6,6 @@ export async function DELETE(
|
|||
request: Request,
|
||||
{ params }: { params: { id: string } }
|
||||
) {
|
||||
const client = await clientPromise;
|
||||
const db = client.db();
|
||||
const { id } = params;
|
||||
|
||||
if (!id) {
|
||||
|
@ -15,6 +13,8 @@ export async function DELETE(
|
|||
}
|
||||
|
||||
try {
|
||||
const client = await clientPromise;
|
||||
const db = client.db("downloadsDatabase");
|
||||
const result = await db
|
||||
.collection("vulnerabilities")
|
||||
.deleteOne({ _id: new ObjectId(id) });
|
||||
|
|
Loading…
Reference in a new issue