feat: del robot by user id
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user