20 lines
537 B
20 lines
537 B
const mongoose = require('mongoose');
|
|
const Schema = mongoose.Schema;
|
|
|
|
let channel =
|
|
new Schema(
|
|
{
|
|
name: {type: String, required: false, max: 100}, // Name for the sake of having one.
|
|
cID: {type:String, required: true}, // channel id where to send updates
|
|
for:{type:String, required: true}//Type of update channel (free games, rust commits)
|
|
}
|
|
);
|
|
|
|
|
|
|
|
|
|
const Channel = module.exports = mongoose.model('channel', channel);
|
|
module.exports.get = (callback, limit)=>
|
|
{
|
|
Channel.find(callback).limit(limit);
|
|
} |