📇 refactor(convoSchema): index updatedAt field (#1732)

This commit is contained in:
Danny Avila 2024-02-05 15:27:06 -05:00 committed by GitHub
parent f30d6bd689
commit b151cd9911
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -55,7 +55,7 @@ if (process.env.MEILI_HOST && process.env.MEILI_MASTER_KEY) {
}); });
} }
convoSchema.index({ createdAt: 1 }); convoSchema.index({ createdAt: 1, updatedAt: 1 });
const Conversation = mongoose.models.Conversation || mongoose.model('Conversation', convoSchema); const Conversation = mongoose.models.Conversation || mongoose.model('Conversation', convoSchema);