fix(crawl-status): add success: true

This commit is contained in:
Gergő Móricz
2024-09-10 18:59:09 +02:00
parent f855ad3436
commit 4ebc35c9dd
3 changed files with 3 additions and 0 deletions
@@ -103,6 +103,7 @@ async function crawlStatusWS(ws: WebSocket, req: RequestWithAuth<CrawlStatusPara
send(ws, { send(ws, {
type: "catchup", type: "catchup",
data: { data: {
success: true,
status, status,
total: jobIDs.length, total: jobIDs.length,
completed: doneJobIDs.length, completed: doneJobIDs.length,
@@ -114,6 +114,7 @@ export async function crawlStatusController(req: RequestWithAuth<CrawlStatusPara
} }
res.status(200).json({ res.status(200).json({
success: true,
status, status,
completed: doneJobsLength, completed: doneJobsLength,
total: jobIDs.length, total: jobIDs.length,
+1
View File
@@ -264,6 +264,7 @@ export type CrawlStatusParams = {
export type CrawlStatusResponse = export type CrawlStatusResponse =
| ErrorResponse | ErrorResponse
| { | {
success: true;
status: "scraping" | "completed" | "failed" | "cancelled"; status: "scraping" | "completed" | "failed" | "cancelled";
completed: number; completed: number;
total: number; total: number;