add email login

This commit is contained in:
Emily
2024-10-10 15:49:55 +02:00
parent 0a7f2b58d0
commit 80e3b0caa9
14 changed files with 531 additions and 27 deletions

View File

@@ -0,0 +1,14 @@
import { model, Schema, Types } from 'mongoose';
export type TPassword = {
email: string,
password: string,
}
const PasswordSchema = new Schema<TPassword>({
email: { type: String, index: true, unique: true },
password: { type: String },
});
export const PasswordModel = model<TPassword>('passwords', PasswordSchema);