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",
       "uid",
       "picture",
+      "filepath",
     ],
   },
   destroy: {
@@ -30,6 +31,7 @@ module.exports = {
       "content",
       "uid",
       "picture",
+      "filepath",
     ],
   },
   show: {

+ 1 - 0
app/model/news.js

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