浏览代码

加入文件路径字段

liuyu 5 年之前
父节点
当前提交
63a8545437
共有 2 个文件被更改,包括 3 次插入0 次删除
  1. 2 0
      app/controller/.news.js
  2. 1 0
      app/model/news.js

+ 2 - 0
app/controller/.news.js

@@ -11,6 +11,7 @@ module.exports = {
       "content",
       "content",
       "uid",
       "uid",
       "picture",
       "picture",
+      "filepath",
     ],
     ],
   },
   },
   destroy: {
   destroy: {
@@ -30,6 +31,7 @@ module.exports = {
       "content",
       "content",
       "uid",
       "uid",
       "picture",
       "picture",
+      "filepath",
     ],
     ],
   },
   },
   show: {
   show: {

+ 1 - 0
app/model/news.js

@@ -14,6 +14,7 @@ const NewsSchema = {
   uid: { type: String, required: false, maxLength: 500 }, // 用户id
   uid: { type: String, required: false, maxLength: 500 }, // 用户id
   content: { type: String, required: false }, // 正文
   content: { type: String, required: false }, // 正文
   picture: { type: String, required: false }, // 图片路径
   picture: { type: String, required: false }, // 图片路径
+  filepath: { type: String, required: false }, // 文件路径
 };
 };