feat: get result
This commit is contained in:
@@ -366,13 +366,13 @@ function cleanupSocketListeners(socket: Socket, browserId: string, id: string) {
|
|||||||
|
|
||||||
router.post("/robots/:id/runs", requireAPIKey, async (req: Request, res: Response) => {
|
router.post("/robots/:id/runs", requireAPIKey, async (req: Request, res: Response) => {
|
||||||
try {
|
try {
|
||||||
const result = await handleRunRecording(req.params.id, req.user.dataValues.id);
|
const interpretationInfo = await handleRunRecording(req.params.id, req.user.dataValues.id);
|
||||||
console.log(`Result`, result);
|
console.log(`Result`, interpretationInfo);
|
||||||
|
|
||||||
const response = {
|
const response = {
|
||||||
statusCode: 200,
|
statusCode: 200,
|
||||||
messageCode: "success",
|
messageCode: "success",
|
||||||
run: result,
|
run: interpretationInfo,
|
||||||
};
|
};
|
||||||
|
|
||||||
res.status(200).json(response);
|
res.status(200).json(response);
|
||||||
@@ -386,4 +386,5 @@ router.post("/robots/:id/runs", requireAPIKey, async (req: Request, res: Respons
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
export default router;
|
export default router;
|
||||||
Reference in New Issue
Block a user