From 1e4ac016337e0f6eaf753316ccdf79f302294fe6 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 21 Oct 2024 20:43:31 +0530 Subject: [PATCH] feat: del 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 f22ce28b..c08e05e4 100644 --- a/server/src/routes/storage.ts +++ b/server/src/routes/storage.ts @@ -62,7 +62,7 @@ router.get('/recordings/:id', requireSignIn, async (req, res) => { router.delete('/recordings/:id', requireSignIn, async (req, res) => { try { await Robot.destroy({ - where: { 'recording_meta.id': req.params.id } + where: { 'recording_meta.id': req.params.id, userId: req.user.id } }); return res.send(true); } catch (e) {