Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.

Commit 60004c2

Browse files
add index
1 parent f452f22 commit 60004c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/DB/messageDB.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var schema = mongoose.Schema({
2525
logTime: { type: Date, default: Date.now }
2626
});
2727

28-
schema.index({ "logTime": -1 });
28+
schema.index({ "logTime": -1, "img.id": 1 });
2929

3030
// create the model for users and expose it to our app
3131
module.exports = mongoose.model('Message', schema);

0 commit comments

Comments
 (0)