Skip to content

Commit a27e365

Browse files
committed
fix: creating comment
1 parent a32f344 commit a27e365

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
@@ -158,12 +158,16 @@ export class AiWorkflowService {
158158
);
159159
}
160160

161+
if (!user.userId) {
162+
throw new BadRequestException(`User id not available`);
163+
}
164+
161165
const createdComment = await this.prisma.aiWorkflowRunItemComment.create({
162166
data: {
163167
workflowRunItemId: itemId,
164168
content: body.content,
165169
parentId: body.parentId ?? null,
166-
userId: user.userId!,
170+
userId: user.userId.toString(),
167171
},
168172
});
169173

0 commit comments

Comments
 (0)