fix streamingKey schema

This commit is contained in:
srgooglo 2022-05-12 10:39:05 +02:00
parent 39ecbf3ee3
commit d295ddda53
3 changed files with 4 additions and 6 deletions

View File

@ -4,6 +4,7 @@ function getSchemas() {
const obj = Object()
const _schemas = require("../schemas")
Object.keys(_schemas).forEach((key) => {
obj[key] = Schema(_schemas[key])
})
@ -13,8 +14,5 @@ function getSchemas() {
const schemas = getSchemas()
// server
export const Config = mongoose.model("Config", schemas.Config, "config")
// streaming
export const StreamingKeys = mongoose.model("StreamingKeys", schemas.StreamingKey, "StreamingKeys")
export const StreamingKey = mongoose.model("StreamingKey", schemas.streamingKey, "streamingKeys")

View File

@ -1,5 +1,5 @@
export default {
userId: {
user_id: {
type: String,
required: true,
},

View File

@ -1 +1 @@
export { default as StreamingKey } from "./StreamingKey"
export { default as streamingKey } from "./streamingKey"