Skip to content

Commit aca09d6

Browse files
committed
fix: creating comment
1 parent aaff6e6 commit aca09d6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/api/ai-workflow/ai-workflow.service.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,16 @@ export class AiWorkflowService {
7070
);
7171
}
7272

73+
if (!user.userId) {
74+
throw new BadRequestException(`User id not available`);
75+
}
76+
7377
const createdComment = await this.prisma.aiWorkflowRunItemComment.create({
7478
data: {
7579
workflowRunItemId: itemId,
7680
content: body.content,
7781
parentId: body.parentId ?? null,
78-
userId: user.userId!,
82+
userId: user.userId.toString(),
7983
},
8084
});
8185

0 commit comments

Comments
 (0)