Yuki Takei 6 лет назад
Родитель
Сommit
7eb8d12887
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/server/models/page-tag-relation.js

+ 1 - 1
src/server/models/page-tag-relation.js

@@ -27,7 +27,7 @@ const schema = new mongoose.Schema({
   },
 });
 // define unique compound index
-schema.index({ page: 1, user: 1 }, { unique: true });
+schema.index({ relatedPage: 1, relatedTag: 1 }, { unique: true });
 schema.plugin(mongoosePaginate);
 schema.plugin(uniqueValidator);