Skip to content

Commit 4b64f1a

Browse files
committed
Cleaned code
1 parent d6d4a7d commit 4b64f1a

File tree

15 files changed

+26033
-9732
lines changed

15 files changed

+26033
-9732
lines changed

.DS_Store

-10 KB
Binary file not shown.

.prettierrc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"tabWidth": 4,
3+
"useTabs": true
4+
}

Notebooks/.DS_Store

-6 KB
Binary file not shown.

client/.prettierrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"singleQuote": true,
3+
"tabWidth": 4,
4+
"useTabs": true
5+
}

client/package-lock.json

+15,577-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"@testing-library/react": "^9.3.2",
88
"@testing-library/user-event": "^7.1.2",
99
"axios": "^0.20.0",
10+
"prettier": "^2.1.2",
1011
"react": "^16.13.1",
1112
"react-dom": "^16.13.1",
1213
"react-router-dom": "^5.2.0",

client/src/pages/Search.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ const Search = () => {
114114
))
115115
}
116116
</div>
117-
</div>
117+
</div>
118118
)}
119119
</div>
120120
)}

client/src/pages/Test.js

Whitespace-only changes.

client/yarn.lock

+10,412-9,721
Large diffs are not rendered by default.

data/.DS_Store

-6 KB
Binary file not shown.

engine/.DS_Store

-6 KB
Binary file not shown.

scripts/.DS_Store

-6 KB
Binary file not shown.

server/.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
node_modules/
1+
node_modules/
2+
.env

server/models/User.js

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
const mongoose = require('mongoose');
2+
const schema = mongoose.Schema();
3+
4+
const userSchema = new schema({
5+
name: {
6+
type: String,
7+
required: [true, 'Please add a name']
8+
},
9+
gender: {
10+
type: String,
11+
enum: ['Male', 'Female']
12+
},
13+
email: {
14+
type: String,
15+
required: [true, 'Please enter an email!'],
16+
unique: true,
17+
match: [
18+
/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/,
19+
'Please enter a valid email'
20+
]
21+
},
22+
password: {
23+
type: String,
24+
required: [true, 'Please add a password'],
25+
minlength: 6
26+
}
27+
});
28+
29+
const userModel = mongoose.model('User', userSchema);
30+
31+
module.exports = userModel;

server/routes/signup.js

Whitespace-only changes.

0 commit comments

Comments
 (0)