feat: delete recording based on meta id

This commit is contained in:
karishmas6
2024-10-09 23:22:38 +05:30
parent e03bd5c8ca
commit 6b4eb8daf0

View File

@@ -55,7 +55,9 @@ router.get('/recordings', requireSignIn, async (req, res) => {
*/
router.delete('/recordings/:id', requireSignIn, async (req, res) => {
try {
await Robot.destroy({ where: { id: req.params.id } });
await Robot.destroy({
where: { 'recording_meta.id': req.params.id }
});
return res.send(true);
} catch (e) {
const { message } = e as Error;