feat: get robot by user id

This commit is contained in:
karishmas6
2024-10-21 20:44:19 +05:30
parent 00e21290f0
commit 4c5018eae0

View File

@@ -200,7 +200,7 @@ router.post('/runs/run/:id', requireSignIn, async (req, res) => {
const plainRun = run.toJSON();
const recording = await Robot.findOne({ where: { 'recording_meta.id': plainRun.robotMetaId }, raw: true });
const recording = await Robot.findOne({ where: { 'recording_meta.id': plainRun.robotMetaId, userId: req.user.id }, raw: true });
if (!recording) {
return res.status(404).send(false);
}