Skip to content

Commit 44315fd

Browse files
committed
fix ts typing
1 parent fb91ddd commit 44315fd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

templates/types/streaming/express/src/controllers/chat-upload.controller.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,10 @@ export const chatUpload = async (req: Request, res: Response) => {
1414
});
1515
}
1616
const index = await getDataSource(params);
17+
if (!index) {
18+
return res.status(500).json({
19+
error: "Failed to get data source",
20+
});
21+
}
1722
return res.status(200).json(await uploadDocument(index, filename, base64));
1823
};

0 commit comments

Comments
 (0)