From 4d7ff26ef9a607ab7f08fd68deded828cca3bb02 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 21 Oct 2024 20:43:01 +0530 Subject: [PATCH] feat: get robots 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 31124b87..f22ce28b 100644 --- a/server/src/routes/storage.ts +++ b/server/src/routes/storage.ts @@ -45,7 +45,7 @@ router.get('/recordings', requireSignIn, async (req, res) => { router.get('/recordings/:id', requireSignIn, async (req, res) => { try { const data = await Robot.findOne({ - where: { 'recording_meta.id': req.params.id }, + where: { 'recording_meta.id': req.params.id, userId: req.user.id }, raw: true } );