Browse Source

clean code

Shun Miyazawa 1 year ago
parent
commit
b6f5f5ad8b
1 changed files with 2 additions and 4 deletions
  1. 2 4
      apps/app/src/features/openai/server/models/thread-relation.ts

+ 2 - 4
apps/app/src/features/openai/server/models/thread-relation.ts

@@ -71,10 +71,8 @@ schema.statics.getThreadRelationAndUpdateExpiration = async function(userId: str
 
 
   const result = await this.findOneAndUpdate(
   const result = await this.findOneAndUpdate(
     { userId, 'threads.threadId': threadId },
     { userId, 'threads.threadId': threadId },
-    {
-      $set: { 'threads.$.expiredAt': expirationDate }, // Extend DAYS_UNTIL_EXPIRATION days from the retrieved time.
-    },
-    { new: true }, // 更新後のドキュメントを返す
+    { $set: { 'threads.$.expiredAt': expirationDate } }, // Extend DAYS_UNTIL_EXPIRATION days from the retrieved time
+    { new: true },
   );
   );
 
 
   return result;
   return result;