refactor(db/models): rename generateToken method to generateJWT

This commit is contained in:
parent f4ed17a893
commit ae8d34d84f
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

@ -75,7 +75,7 @@ export interface IUser extends Document {
quickMenuConfig: QuickMenuItem[];
notifyOnReviewReply?: boolean;
validPassword(password: string): boolean;
generateToken(jwtSecret: string): string;
generateJWT(jwtSecret: string): string;
}
// type iut = IUser;
interface UModel extends Model<IUser> {
@ -281,7 +281,7 @@ UserSchema.methods.validPassword = function (password: string): boolean {
);
};
UserSchema.methods.generateToken = function (jwtKey: string): string {
UserSchema.methods.generateJWT = function (jwtKey: string): string {
let token = jwt.sign(
{ id: this._id, isAdmin: this.profile.isAdmin },
jwtKey,