Explorar o código

fix codeql error

Yuki Takei hai 9 meses
pai
achega
1b49faa7e0
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      apps/app/src/features/openai/server/routes/edit/index.ts

+ 1 - 1
apps/app/src/features/openai/server/routes/edit/index.ts

@@ -216,7 +216,7 @@ export const postMessageToEditHandlersFactory: PostMessageHandlersFactory = (cro
         }
         }
       }
       }
 
 
-      const aiAssistant = aiAssistantId != null ? await AiAssistantModel.findById(aiAssistantId) : undefined;
+      const aiAssistant = aiAssistantId != null ? await AiAssistantModel.findOne({ _id: { $eq: aiAssistantId } }) : undefined;
 
 
       // Initialize SSE helper and stream processor
       // Initialize SSE helper and stream processor
       const sseHelper = new SseHelper(res);
       const sseHelper = new SseHelper(res);