feat: validate target_url
This commit is contained in:
@@ -262,8 +262,8 @@ router.put('/recordings/:id', requireSignIn, async (req: AuthenticatedRequest, r
|
|||||||
const { name, limit, credentials, targetUrl } = req.body;
|
const { name, limit, credentials, targetUrl } = req.body;
|
||||||
|
|
||||||
// Validate input
|
// Validate input
|
||||||
if (!name && limit === undefined) {
|
if (!name && limit === undefined && !targetUrl) {
|
||||||
return res.status(400).json({ error: 'Either "name" or "limit" must be provided.' });
|
return res.status(400).json({ error: 'Either "name", "limit" or "target_url" must be provided.' });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fetch the robot by ID
|
// Fetch the robot by ID
|
||||||
|
|||||||
Reference in New Issue
Block a user