Skip to content

Commit

Permalink
Fix eslint nested configs and eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
gwenf committed Aug 30, 2024
1 parent fab029d commit 58bc736
Show file tree
Hide file tree
Showing 11 changed files with 225 additions and 277 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"editor.tabSize": 2,
"eslint.format.enable": true,
"editor.formatOnSave": true,
"eslint.codeActionsOnSave.rules": null
"eslint.codeActionsOnSave.rules": null,
"eslint.lintTask.enable": true
}
10 changes: 6 additions & 4 deletions curriculum-back/server/api/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ router.route('/:id/update-password')
if (newPassword.length >= 8) {
res.send(400)
}

const id = req.params.id
const user = await User.findById(id)

Expand All @@ -45,7 +45,7 @@ router.route('/:id/update-password')
await user.save()

res.send(200)
})
})

router.route('/:id')
.get(async (req, res) => {
Expand All @@ -67,11 +67,13 @@ router.route('/:id')
res.send(201)
})
.delete(async (req, res) => {

const userId = req.params.id
await User.findByIdAndDelete(userId)
res.send(200)
})

router.route('/')
.get(async (req, res) => {
.get(async (_, res) => {
const users = await User.find()
res.send(users)
})
Expand Down
25 changes: 0 additions & 25 deletions curriculum-front/.eslintrc.cjs

This file was deleted.

Loading

0 comments on commit 58bc736

Please sign in to comment.