refactor: enhance admin dashboard and layout with blog management links

This commit is contained in:
Wini_Fy
2026-02-04 16:03:28 +07:00
parent 3e1e6d0a87
commit 01d315afb8
7 changed files with 34 additions and 7 deletions

View File

@@ -91,7 +91,6 @@ const blogSchema = new mongoose.Schema({
});
// Indexes
blogSchema.index({ slug: 1 });
blogSchema.index({ status: 1, createdAt: -1 });
blogSchema.index({ category: 1, status: 1 });
blogSchema.index({ isFeatured: 1, status: 1 });

View File

@@ -30,7 +30,6 @@ const blogCategorySchema = new mongoose.Schema({
});
// Indexes
blogCategorySchema.index({ slug: 1 });
blogCategorySchema.index({ isActive: 1, name: 1 });
// Remove __v from JSON output

View File

@@ -26,7 +26,6 @@ const blogTagSchema = new mongoose.Schema({
});
// Indexes
blogTagSchema.index({ slug: 1 });
blogTagSchema.index({ isActive: 1, name: 1 });
// Remove __v from JSON output

View File

@@ -179,9 +179,10 @@ const DetailedViewSchema = new mongoose.Schema(
// Main VisaCountry Schema (Individual country object)
const VisaCountrySchema = new mongoose.Schema(
{
id: { type: Number, required: true, index: true },
name: { type: String, required: true, index: true },
slug: { type: String, required: true, unique: true, index: true },
// Không dùng `index: true` ở đây vì đã tạo index riêng cho hero.summaryList.* bên dưới
id: { type: Number, required: true },
name: { type: String, required: true },
slug: { type: String, required: true, unique: true },
icon: { type: String, default: "" },
services: {
type: [String],