Update project-bot-fns.ts

This commit is contained in:
Daniel Hougaard
2024-05-23 15:48:54 +02:00
parent 68d1849ba0
commit 6230167794

View File

@@ -20,10 +20,7 @@ export const getBotKeyFnFactory = (
) => {
const getBotKeyFn = async (projectId: string) => {
const project = await projectDAL.findById(projectId);
if (!project)
throw new BadRequestError({
message: "Project not found during bot lookup."
});
if (!project) throw new BadRequestError({ message: "Project not found during bot lookup." });
const bot = await projectBotDAL.findOne({ projectId: project.id });