mirror of
https://github.com/LowderPlay/cheburcheck.git
synced 2026-10-11 00:28:10 +03:00
feat: individual tasks (#86)
* feat: hidden nodes and individual tasks * chore: bump version
This commit is contained in:
@@ -113,10 +113,14 @@ export type ProbeStatus = {
|
||||
|
||||
export function startProbeSSE(
|
||||
id: string,
|
||||
token: string,
|
||||
onResult: (result: ProbeResult) => void,
|
||||
onStatus: (status: Partial<ProbeStatus>) => void,
|
||||
) {
|
||||
const eventSource = new EventSource(`/api/v1/probe/${id}`);
|
||||
const params = new URLSearchParams();
|
||||
if (token) params.set("token", token);
|
||||
const query = params.size > 0 ? `?${params.toString()}` : "";
|
||||
const eventSource = new EventSource(`/api/v1/probe/${id}${query}`);
|
||||
|
||||
eventSource.addEventListener("started", (event) => {
|
||||
const data = JSON.parse(event.data);
|
||||
|
||||
Reference in New Issue
Block a user