fix(crawl-status): add success: true
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user