liuyu 5 роки тому
батько
коміт
f1a00724ea
2 змінених файлів з 3 додано та 3 видалено
  1. 1 1
      app/controller/.optlog.js
  2. 2 2
      app/model/optlog.js

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

@@ -1,6 +1,6 @@
 module.exports = {
   create: {
-    requestBody: ['!userid', 'name', '!unitid', 'ip', 'createtime', 'type', 'target', 'content', 'status', 'remark']
+    requestBody: ['userid', 'name', 'unitid', 'ip', 'createtime', 'type', 'target', 'content', 'status', 'remark']
   },
   destroy: {
     params: ['!id'],

+ 2 - 2
app/model/optlog.js

@@ -4,9 +4,9 @@ const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
 
 // 文件导入表
 const OptlogSchema = {
-  userid: { type: String, required: true, maxLength: 64 }, // 操作人
+  userid: { type: String, required: false, maxLength: 64 }, // 操作人
   name: { type: String, required: false, maxLength: 200 }, // 名称
-  unitid: { type: String, required: true, maxLength: 64 }, // 学校/分站id
+  unitid: { type: String, required: false, maxLength: 64 }, // 学校/分站id
   ip: { type: String, required: false, maxLength: 64 }, // ip地址
   createtime: { type: String, required: false, maxLength: 20 }, // 时间
   type: { type: String, required: false, maxLength: 64 }, // 操作类型: 1. 添加 2.修改 3. 删除 4.查询