Encrypted the License.ts
This commit is contained in:
parent
0aff108ada
commit
6a9b3c2c5e
@ -1,4 +1,5 @@
|
|||||||
import {model, ObjectId, Schema, Types} from "mongoose";
|
import {model, ObjectId, Schema, Types} from "mongoose";
|
||||||
|
import encrypt from 'mongoose-encryption';
|
||||||
|
|
||||||
export enum ILicenseMetaType {
|
export enum ILicenseMetaType {
|
||||||
STRING
|
STRING
|
||||||
@ -38,4 +39,9 @@ const LicenseSchema = new Schema<ILicense>({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
export const Account = model<ILicense>("licenses", LicenseSchema);
|
LicenseSchema.plugin(encrypt, {
|
||||||
|
encryptionKey: process.env.ENC_KEY,
|
||||||
|
signingKey: process.env.SIG_KEY
|
||||||
|
});
|
||||||
|
|
||||||
|
export const License = model<ILicense>("licenses", LicenseSchema);
|
Loading…
x
Reference in New Issue
Block a user