reloaded 5 年之前
父節點
當前提交
b97d3cc795
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 1 1
      app/controller/.news.js
  2. 2 2
      app/model/news.js

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

@@ -3,7 +3,7 @@ module.exports = {
     requestBody: [
       "!col_name",
       "!title",
-      "!introduction",
+      "introduction",
       "content",
       "publish_time",
       "publish_unit",

+ 2 - 2
app/model/news.js

@@ -6,11 +6,11 @@ const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
 const NewsSchema = {
   col_name: { type: String, required: true, maxLength: 200 }, // 栏目名称
   title: { type: String, required: true, maxLength: 200 }, // 标题
-  introduction: { type: String, required: true, maxLength: 200 }, // 简介
+  introduction: { type: String, required: false, maxLength: 200 }, // 简介
   content: { type: String, required: false }, // 内容
   publish_time: { type: String, required: false, maxLength: 200 }, // 发布时间
   publish_unit: { type: String, required: false, maxLength: 200 }, // 发布单位
-  publisher: { type: String, required: true, maxLength: 200 }, // 发布人
+  publisher: { type: String, required: false, maxLength: 200 }, // 发布人
   type: { type: String, required: false, maxLength: 200 }, // 0-自有,1-外链
   url: { type: String, required: false, maxLength: 200 }, // 链接地址
   img_url: { type: String, required: false, maxLength: 200 }, // 图片路径