mirror of
https://github.com/simstudioai/sim.git
synced 2026-04-06 03:00:16 -04:00
fix(deployed-chat): include workspace id in deployed chat request (#1664)
This commit is contained in:
@@ -98,6 +98,7 @@ export async function POST(
|
||||
const workflowResult = await db
|
||||
.select({
|
||||
isDeployed: workflow.isDeployed,
|
||||
workspaceId: workflow.workspaceId,
|
||||
})
|
||||
.from(workflow)
|
||||
.where(eq(workflow.id, deployment.workflowId))
|
||||
@@ -146,7 +147,12 @@ export async function POST(
|
||||
|
||||
const stream = await createStreamingResponse({
|
||||
requestId,
|
||||
workflow: { id: deployment.workflowId, userId: deployment.userId, isDeployed: true },
|
||||
workflow: {
|
||||
id: deployment.workflowId,
|
||||
userId: deployment.userId,
|
||||
workspaceId: workflowResult[0].workspaceId,
|
||||
isDeployed: true,
|
||||
},
|
||||
input: workflowInput,
|
||||
executingUserId: deployment.userId,
|
||||
streamConfig: {
|
||||
|
||||
@@ -16,7 +16,7 @@ export interface StreamingConfig {
|
||||
|
||||
export interface StreamingResponseOptions {
|
||||
requestId: string
|
||||
workflow: { id: string; userId: string; isDeployed?: boolean }
|
||||
workflow: { id: string; userId: string; workspaceId?: string | null; isDeployed?: boolean }
|
||||
input: any
|
||||
executingUserId: string
|
||||
streamConfig: StreamingConfig
|
||||
|
||||
Reference in New Issue
Block a user