mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
feat: add password login
This commit is contained in:
1 parent
a5dbcd7db4
commit
bcdd04715d
8 files changed
+390
-12
No files matched your search
@@ -1,9 +1,17 @@
|
||||
import { model } from 'mongoose'
|
||||
|
||||
const User = model('User', {
|
||||
username: String,
|
||||
password: String,
|
||||
email: String,
|
||||
username: {
|
||||
type: String,
|
||||
unique: true,
|
||||
required: true,
|
||||
},
|
||||
email: {
|
||||
type: String,
|
||||
unique: true,
|
||||
required: true,
|
||||
},
|
||||
hashedPassword: String,
|
||||
})
|
||||
|
||||
export default User
|
||||
Reference in new issue
Block a user