Browse Source

thread -> threadRelation

Shun Miyazawa 1 year ago
parent
commit
c48b26699e
1 changed files with 4 additions and 4 deletions
  1. 4 4
      apps/app/src/features/openai/server/routes/message.ts

+ 4 - 4
apps/app/src/features/openai/server/routes/message.ts

@@ -77,12 +77,12 @@ export const postMessageHandlersFactory: PostMessageHandlersFactory = (crowi) =>
         return res.apiv3Err(new ErrorV3('AI assistant not found'), 404);
       }
 
-      const thread = await ThreadRelationModel.findOne({ threadId });
-      if (thread == null) {
-        return res.apiv3Err(new ErrorV3('Thread not found'), 404);
+      const threadRelation = await ThreadRelationModel.findOne({ threadId });
+      if (threadRelation == null) {
+        return res.apiv3Err(new ErrorV3('ThreadRelation not found'), 404);
       }
 
-      thread.updateThreadExpiration();
+      threadRelation.updateThreadExpiration();
 
       let stream: AssistantStream;