Преглед изворни кода

Merge pull request #9852 from weseek/fix/164706-codeql-problems

fix: CodeQL problems
Yuki Takei пре 1 година
родитељ
комит
feffeb9445
1 измењених фајлова са 1 додато и 1 уклоњено
  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

@@ -154,7 +154,7 @@ export const postMessageToEditHandlersFactory: PostMessageHandlersFactory = (cro
         return res.apiv3Err(new ErrorV3('GROWI AI is not enabled'), 501);
       }
 
-      const threadRelation = await ThreadRelationModel.findOne({ threadId });
+      const threadRelation = await ThreadRelationModel.findOne({ threadId: { $eq: threadId } });
       if (threadRelation == null) {
         return res.apiv3Err(new ErrorV3('ThreadRelation not found'), 404);
       }