role updated
This commit is contained in:
@@ -7,14 +7,11 @@ export interface Token extends Document {
|
||||
refreshToken: string;
|
||||
resetTokenExpiry?: Date;
|
||||
resetToken: string;
|
||||
role: string;
|
||||
}
|
||||
const tokenSchema: Schema = new Schema({
|
||||
userId: { type: Schema.Types.ObjectId, ref: "User" },
|
||||
isArchive: { type: Boolean, default: false },
|
||||
token: { type: String },
|
||||
refreshToken: { type: String },
|
||||
tokenCreatedAt: { type: Date },
|
||||
resetToken: { type: String },
|
||||
resetTokenExpiry: { type: Date },
|
||||
});
|
||||
|
||||
@@ -6,13 +6,15 @@ export interface User extends Document {
|
||||
Password: string;
|
||||
isArchive: boolean;
|
||||
visitorBrowserID: string;
|
||||
role: string;
|
||||
lastPasswordReset: number;
|
||||
}
|
||||
const AuthSchema: Schema = new Schema({
|
||||
userName: {
|
||||
type: String,
|
||||
required: true,
|
||||
},role: {
|
||||
},
|
||||
role: {
|
||||
type: String,
|
||||
default: "User",
|
||||
enum: ["User", "Admin"],
|
||||
|
||||
Reference in New Issue
Block a user