chore: lint
This commit is contained in:
@@ -173,32 +173,32 @@ router.get("/robots/:id/runs/:runId", requireAPIKey, async (req: Request, res: R
|
|||||||
|
|
||||||
async function createWorkflowAndStoreMetadata(id: string, userId: string) {
|
async function createWorkflowAndStoreMetadata(id: string, userId: string) {
|
||||||
try {
|
try {
|
||||||
const recording = await Robot.findOne({
|
const recording = await Robot.findOne({
|
||||||
where: {
|
where: {
|
||||||
'recording_meta.id': id
|
'recording_meta.id': id
|
||||||
},
|
},
|
||||||
raw: true
|
raw: true
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!recording || !recording.recording_meta || !recording.recording_meta.id) {
|
if (!recording || !recording.recording_meta || !recording.recording_meta.id) {
|
||||||
return {
|
return {
|
||||||
success: false,
|
success: false,
|
||||||
error: 'Recording not found'
|
error: 'Recording not found'
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const proxyConfig = await getDecryptedProxyConfig(userId);
|
const proxyConfig = await getDecryptedProxyConfig(userId);
|
||||||
let proxyOptions: any = {};
|
let proxyOptions: any = {};
|
||||||
|
|
||||||
if (proxyConfig.proxy_url) {
|
if (proxyConfig.proxy_url) {
|
||||||
proxyOptions = {
|
proxyOptions = {
|
||||||
server: proxyConfig.proxy_url,
|
server: proxyConfig.proxy_url,
|
||||||
...(proxyConfig.proxy_username && proxyConfig.proxy_password && {
|
...(proxyConfig.proxy_username && proxyConfig.proxy_password && {
|
||||||
username: proxyConfig.proxy_username,
|
username: proxyConfig.proxy_username,
|
||||||
password: proxyConfig.proxy_password,
|
password: proxyConfig.proxy_password,
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const browserId = createRemoteBrowserForRun({
|
const browserId = createRemoteBrowserForRun({
|
||||||
browser: chromium,
|
browser: chromium,
|
||||||
@@ -374,7 +374,7 @@ router.post("/robots/:id/runs", requireAPIKey, async (req: Request, res: Respons
|
|||||||
const response = {
|
const response = {
|
||||||
statusCode: 200,
|
statusCode: 200,
|
||||||
messageCode: "success",
|
messageCode: "success",
|
||||||
run: interpretationInfo,
|
run: interpretationInfo,
|
||||||
};
|
};
|
||||||
|
|
||||||
res.status(200).json(response);
|
res.status(200).json(response);
|
||||||
|
|||||||
Reference in New Issue
Block a user