feat: del robot by user id

This commit is contained in:
karishmas6
2024-10-21 20:43:31 +05:30
parent 4d7ff26ef9
commit 1e4ac01633

View File

@@ -62,7 +62,7 @@ router.get('/recordings/:id', requireSignIn, async (req, res) => {
router.delete('/recordings/:id', requireSignIn, async (req, res) => { router.delete('/recordings/:id', requireSignIn, async (req, res) => {
try { try {
await Robot.destroy({ 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); return res.send(true);
} catch (e) { } catch (e) {