reloaded před 5 roky
rodič
revize
4d0e012c8b
2 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. 1 1
      app/controller/.column.js
  2. 2 2
      app/model/column.js

+ 1 - 1
app/controller/.column.js

@@ -2,7 +2,7 @@ module.exports = {
   create: {
     requestBody: [
       '!name',
-      '!site'
+      'site'
     ]
   },
   destroy: {

+ 2 - 2
app/model/column.js

@@ -5,7 +5,7 @@ const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
 // 栏目表
 const ColumnSchema = {
   name: { type: String, required: true, maxLength: 500 }, // 栏目名称
-  site: { type: String, required: true, maxLength: 500 }, // 栏目位置
+  site: { type: String, required: false, maxLength: 500 }, // 栏目位置
 };
 
 
@@ -16,4 +16,4 @@ schema.plugin(metaPlugin);
 module.exports = app => {
   const { mongoose } = app;
   return mongoose.model('Column', schema, 'policy_column');
-};
+};