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

View File

@ -103,6 +103,7 @@ async function crawlStatusWS(ws: WebSocket, req: RequestWithAuth<CrawlStatusPara
send(ws, {
type: "catchup",
data: {
success: true,
status,
total: jobIDs.length,
completed: doneJobIDs.length,

View File

@ -114,6 +114,7 @@ export async function crawlStatusController(req: RequestWithAuth<CrawlStatusPara
}
res.status(200).json({
success: true,
status,
completed: doneJobsLength,
total: jobIDs.length,

View File

@ -264,6 +264,7 @@ export type CrawlStatusParams = {
export type CrawlStatusResponse =
| ErrorResponse
| {
success: true;
status: "scraping" | "completed" | "failed" | "cancelled";
completed: number;
total: number;