1 | import * as bcrypt from "bcrypt-nodejs";
|
2 | import * as crypto from "crypto";
|
3 | import * as mongoose from "mongoose";
|
4 | import { ObjectId } from "mongodb";
|
5 |
|
6 | const configSchema = new mongoose.Schema({
|
7 | Name: { type: String, unique: true },
|
8 | Config: Object,
|
9 | }, { timestamps: true });
|
10 |
|
11 | /**
|
12 | * pre save config middleware.
|
13 | */
|
14 | configSchema.pre("save", function save(next) {
|
15 | const config = this;
|
16 | // if (!config.isModified("password")) { return next(); }
|
17 | next();
|
18 | });
|
19 |
|
20 | const Config = mongoose.model("Config", configSchema);
|
21 |
|
22 | export { Config }; |
\ | No newline at end of file |