فهرست منبع

update query with $eq

Shun Miyazawa 1 سال پیش
والد
کامیت
c031c27880
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

@@ -95,7 +95,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);
       }