Archived
2

implemented /help route

This commit is contained in:
VLE2FE
2020-09-03 10:06:16 +02:00
parent 364ad1964e
commit 6ae49e9f09
10 changed files with 393 additions and 2 deletions

16
src/models/help.ts Normal file
View 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);