From 4c5018eae0da01db613c6c1380965cc45e342c3e Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 21 Oct 2024 20:44:19 +0530 Subject: [PATCH] feat: get robot by user id --- server/src/routes/storage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/routes/storage.ts b/server/src/routes/storage.ts index c35287aa..1ab3cf58 100644 --- a/server/src/routes/storage.ts +++ b/server/src/routes/storage.ts @@ -200,7 +200,7 @@ router.post('/runs/run/:id', requireSignIn, async (req, res) => { const plainRun = run.toJSON(); - const recording = await Robot.findOne({ where: { 'recording_meta.id': plainRun.robotMetaId }, raw: true }); + const recording = await Robot.findOne({ where: { 'recording_meta.id': plainRun.robotMetaId, userId: req.user.id }, raw: true }); if (!recording) { return res.status(404).send(false); }