implemented /help route
This commit is contained in:
16
src/models/help.ts
Normal file
16
src/models/help.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import db from '../db';
|
||||
import mongoose from 'mongoose';
|
||||
|
||||
const HelpSchema = new mongoose.Schema({
|
||||
key: {type: String, index: {unique: true}},
|
||||
level: String,
|
||||
text: String
|
||||
}, {minimize: false});
|
||||
|
||||
// changelog query helper
|
||||
HelpSchema.query.log = function <Q extends mongoose.DocumentQuery<any, any>> (req) {
|
||||
db.log(req, this);
|
||||
return this;
|
||||
}
|
||||
|
||||
export default mongoose.model<any, mongoose.Model<any, any>>('help', HelpSchema);
|
Reference in New Issue
Block a user