From 00e21290f0ca91a431642195af2b613cc9b5990a Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 21 Oct 2024 20:43:50 +0530 Subject: [PATCH] feat: get robot by user id --- server/src/routes/storage.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/src/routes/storage.ts b/server/src/routes/storage.ts index c08e05e4..c35287aa 100644 --- a/server/src/routes/storage.ts +++ b/server/src/routes/storage.ts @@ -107,7 +107,8 @@ router.put('/runs/:id', requireSignIn, async (req, res) => { try { const recording = await Robot.findOne({ where: { - 'recording_meta.id': req.params.id + 'recording_meta.id': req.params.id, + userId: req.user.id, }, raw: true });