fix: on/off tab in home page

This commit is contained in:
Đỗ Minh Nhật
2026-04-11 04:46:33 +07:00
parent 5b96bfeb87
commit e7929568dc
14 changed files with 48 additions and 26 deletions

View File

@@ -349,5 +349,8 @@ const HomeSchema = new Schema(
},
);
// Đảm bảo chỉ có 1 document duy nhất (singleton pattern)
HomeSchema.index({ createdAt: 1 }, { unique: false });
module.exports = mongoose.model("Home", HomeSchema);