Updated the Session.ts model

This commit is contained in:
Mathias Wagner 2023-01-15 16:10:34 +01:00
parent e2f92c39d6
commit badd8d35fb
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

View File

@ -5,7 +5,8 @@ interface ISession {
id: ObjectId,
userId: ObjectId,
token: string,
userAgent: string
userAgent: string,
verified: boolean
}
const SessionSchema = new Schema<ISession>({
@ -17,7 +18,11 @@ const SessionSchema = new Schema<ISession>({
type: String,
required: true
},
userAgent: String
userAgent: String,
verified: {
type: Boolean,
required: true
}
});
SessionSchema.plugin(encrypt, {