Progress with authentication tolen

This commit is contained in:
Riccardo
2021-01-05 13:58:26 +01:00
parent 4d021d6043
commit 436eb4410c
8 changed files with 138 additions and 34 deletions

21
server/src/models/user.js Normal file
View File

@@ -0,0 +1,21 @@
import mongoose from 'mongoose';
const Schema = mongoose.Schema;
const UserSchema = new Schema({
username: {
type: String,
required: true
},
email: {
type: String,
required: true
},
password: {
type: String,
required: true
},
deleted: {
type: Boolean,
required: false
}
});
export default mongoose.model('user', UserSchema);