mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-12 20:14:15 +00:00
20 lines
476 B
JavaScript
20 lines
476 B
JavaScript
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") |