Procházet zdrojové kódy

# Feature/196, 198, 199 Grouping users
* Fix userGroup model.
* Fix userGroupRelation model.

Tatsuya Ise před 8 roky
rodič
revize
07a070733d
2 změnil soubory, kde provedl 1 přidání a 2 odebrání
  1. 1 1
      lib/models/userGroup.js
  2. 0 1
      lib/models/userGroupRelation.js

+ 1 - 1
lib/models/userGroup.js

@@ -14,7 +14,7 @@ module.exports = function(crowi) {
   userGroupSchema = new mongoose.Schema({
   userGroupSchema = new mongoose.Schema({
     userGroupId: String,
     userGroupId: String,
     image: String,
     image: String,
-    name: { type: String, required: true, unique: true, index: true },
+    name: { type: String, required: true, unique: true },
     createdAt: { type: Date, default: Date.now },
     createdAt: { type: Date, default: Date.now },
   });
   });
   userGroupSchema.plugin(mongoosePaginate);
   userGroupSchema.plugin(mongoosePaginate);

+ 0 - 1
lib/models/userGroupRelation.js

@@ -14,7 +14,6 @@ module.exports = function(crowi) {
     createdAt: { type: Date, default: Date.now },
     createdAt: { type: Date, default: Date.now },
   });
   });
   userGroupRelationSchema.plugin(mongoosePaginate);
   userGroupRelationSchema.plugin(mongoosePaginate);
-  userGroupRelationSchema.plugin(uniqueValidator);
 
 
   // すべてのグループ所属関係を取得
   // すべてのグループ所属関係を取得
   userGroupRelationSchema.statics.findAllRelation = function() {
   userGroupRelationSchema.statics.findAllRelation = function() {