mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
added StreamingKeys
model
This commit is contained in:
parent
f00a15548b
commit
fa2e40c75d
20
packages/streaming-server/src/models/index.js
Normal file
20
packages/streaming-server/src/models/index.js
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import mongoose, { Schema } from "mongoose"
|
||||||
|
|
||||||
|
function getSchemas() {
|
||||||
|
const obj = Object()
|
||||||
|
|
||||||
|
const _schemas = require("../schemas")
|
||||||
|
Object.keys(_schemas).forEach((key) => {
|
||||||
|
obj[key] = Schema(_schemas[key])
|
||||||
|
})
|
||||||
|
|
||||||
|
return obj
|
||||||
|
}
|
||||||
|
|
||||||
|
const schemas = getSchemas()
|
||||||
|
|
||||||
|
// server
|
||||||
|
export const Config = mongoose.model("Config", schemas.Config, "config")
|
||||||
|
|
||||||
|
// streaming
|
||||||
|
export const StreamingKeys = mongoose.model("StreamingKeys", schemas.StreamingKey, "StreamingKeys")
|
Loading…
x
Reference in New Issue
Block a user