Showing
4 changed files
with
7 additions
and
6 deletions
... | @@ -4,7 +4,7 @@ const app = express() | ... | @@ -4,7 +4,7 @@ const app = express() |
4 | const bodyParser = require('body-parser'); | 4 | const bodyParser = require('body-parser'); |
5 | const port = 5000 | 5 | const port = 5000 |
6 | 6 | ||
7 | -const { User } = require('./models/Users'); | 7 | +const {User} = require('./models/Users'); |
8 | 8 | ||
9 | app.use(bodyParser.urlencoded({extended : true})); | 9 | app.use(bodyParser.urlencoded({extended : true})); |
10 | app.use(bodyParser.json()); | 10 | app.use(bodyParser.json()); | ... | ... |
... | @@ -11,7 +11,7 @@ const userSchema = mongoose.Schema({ | ... | @@ -11,7 +11,7 @@ const userSchema = mongoose.Schema({ |
11 | }, | 11 | }, |
12 | password :{ | 12 | password :{ |
13 | type : String, | 13 | type : String, |
14 | - minlength : 50 | 14 | + maxlength : 50 |
15 | }, | 15 | }, |
16 | lastname:{ | 16 | lastname:{ |
17 | type : String, | 17 | type : String, |
... | @@ -26,14 +26,14 @@ const userSchema = mongoose.Schema({ | ... | @@ -26,14 +26,14 @@ const userSchema = mongoose.Schema({ |
26 | type : String | 26 | type : String |
27 | }, | 27 | }, |
28 | tokenExp :{ | 28 | tokenExp :{ |
29 | - type: Number, | 29 | + type: Number |
30 | } | 30 | } |
31 | 31 | ||
32 | }) | 32 | }) |
33 | 33 | ||
34 | -const Users = mongoose.model('Users', userSchema) | 34 | +const User = mongoose.model('Users', userSchema) |
35 | 35 | ||
36 | 36 | ||
37 | 37 | ||
38 | -module.exports = {Users} | 38 | +module.exports = {User} |
39 | 39 | ... | ... |
This diff is collapsed. Click to expand it.
-
Please register or login to post a comment