MCPcopy Index your code
hub / github.com/simstudioai/sim / postToRealtime

Function postToRealtime

apps/sim/lib/workspaces/fork/socket.ts:7–16  ·  view source on GitHub ↗
(path: string, workflowId: string)

Source from the content-addressed store, hash-verified

5const logger = createLogger('WorkspaceForkSocket')
6
7async function postToRealtime(path: string, workflowId: string): Promise<void> {
8 const response = await fetch(`${getSocketServerUrl()}${path}`, {
9 method: 'POST',
10 headers: { 'Content-Type': 'application/json', 'x-api-key': env.INTERNAL_API_SECRET },
11 body: JSON.stringify({ workflowId }),
12 })
13 if (!response.ok) {
14 throw new Error(`${path} responded ${response.status}`)
15 }
16}
17
18/**
19 * Notify connected canvas clients that a fork promote/rollback force-replaced a

Callers 1

Calls 1

getSocketServerUrlFunction · 0.90

Tested by

no test coverage detected