change(readme) update readme and some changes to database

This commit is contained in:
Yusuf İpek
2021-07-25 12:56:57 +03:00
parent 53694ac883
commit 408cec0c01
5 changed files with 97 additions and 14 deletions
+2 -1
View File
@@ -32,6 +32,7 @@ router.post("/", auth, async (req, res) => {
const {
name,
metAt,
place,
contact,
birth,
@@ -50,6 +51,7 @@ router.post("/", auth, async (req, res) => {
const person = new Person({
name,
place,
metAt,
contact,
birth,
age,
@@ -100,7 +102,6 @@ router.put("/:id", auth, validateObjectId, async (req, res) => {
if (!req.body.notes) req.body.notes = notes;
if (!req.body.tags) req.body.tags = tags;
console.log(req.body);
const { error } = validate(req.body);
if (error) return res.status(400).send(error.details[0].message);