fix(backend): remove duplicate mongoose index definition on expires_at

This commit is contained in:
rafif committed 2026-07-21 14:16:50 +07:00
1 parent 36fe496566
commit 040ef4d45d
1 file changed
+1 -1
+1 -1
View File
@@ -11,7 +11,7 @@ const SessionSchema = new mongoose.Schema({
user_agent: { type: String, default: 'Unknown' },
session_token: { type: String, required: true, unique: true }, // JWT JTI or unique token hash
last_active: { type: Date, default: Date.now },
expires_at: { type: Date, required: true, index: true }, // MongoDB TTL Index will auto-expire sessions
expires_at: { type: Date, required: true }, // MongoDB TTL Index specified below via SessionSchema.index
}, {
timestamps: { createdAt: 'created_at', updatedAt: 'updated_at' }
});