liuyu 4 vuotta sitten
vanhempi
commit
cbdc21538f
2 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 2 2
      app/controller/.room.js
  2. 1 0
      app/model/room.js

+ 2 - 2
app/controller/.room.js

@@ -1,6 +1,6 @@
 module.exports = {
   create: {
-    requestBody: ["name", "type", "filedir", "url", "anchorid","status"],
+    requestBody: ["name", "type", "filedir", "url", "anchorid","username","status"],
   },
   destroy: {
     params: ["!id"],
@@ -8,7 +8,7 @@ module.exports = {
   },
   update: {
     params: ["!id"],
-    requestBody: ["name", "type", "filedir", "url", "anchorid","status"],
+    requestBody: ["name", "type", "filedir", "url", "anchorid","username","status"],
   },
   show: {
     parameters: {

+ 1 - 0
app/model/room.js

@@ -8,6 +8,7 @@ const RoomSchema = {
   filedir: { type: String, required: false, maxLength: 200 }, // 封面图片
   url: { type: String, required: false, maxLength: 200 }, // 房间地址
   anchorid: { type: String, required: false, maxLength: 200 }, // 主播id
+  username: { type: String, required: false, maxLength: 200 }, // 主播名称
   status: { type: String, required: false, maxLength: 64 }, // 状态0、开启1、关闭
 };