Skip to content

Commit

Permalink
fix(api-softwareAssets): /view-all/:id updated to search by correct ID
Browse files Browse the repository at this point in the history
  • Loading branch information
LiamTownsley committed Nov 16, 2023
1 parent 9d020fa commit 0a3b287
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion electron/api/routes/SoftwareAssetRoutes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ router.get('/view-all/:id', async (req: Request, res: Response) => {
const collection = db.collection(DATABASE);
const id = req.params.id;

const data = await collection.find({ parent_employee: new mongo.ObjectId(id) }).toArray();
const data = await collection.find({ 'parent_hardware.id': new mongo.ObjectId(id) }).toArray();
res.json(data);
})
});
Expand Down

0 comments on commit 0a3b287

Please sign in to comment.