Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mboudet committed Feb 2, 2024
1 parent bcfb4db commit 5a95af4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions routes/groups.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ router.put('/group/:id', async function(req, res){
return;
}

let description = req.body.description
let description = req.body.description;

let group = await dbsrv.mongo_groups().findOne({name: req.params.id});
if(! group) {
Expand Down Expand Up @@ -193,7 +193,7 @@ router.post('/group/:id', async function(req, res){
return;
}

let description = req.body.description
let description = req.body.description;

let group = await dbsrv.mongo_groups().findOne({name: req.params.id });
if(group) {
Expand Down
6 changes: 3 additions & 3 deletions routes/projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,9 @@ router.put('/project', async function(req, res){
let project = await dbsrv.mongo_pending_projects().findOne({'uuid': req.body.uuid});

if (!project){
res.status(403).send({message: 'Project does not exist'});
res.end();
return;
res.status(403).send({message: 'Project does not exist'});
res.end();
return;
}

let related_project = await dbsrv.mongo_projects().findOne({'id': req.body.id});
Expand Down
7 changes: 3 additions & 4 deletions routes/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ router.get('/user/:id/expire', async function(req, res){
return;
}

let sendmail = req.query.sendmail === "false" ? false : true;
let sendmail = req.query.sendmail === 'false' ? false : true;

let session_user = null;
let isadmin = false;
Expand Down Expand Up @@ -1001,7 +1001,7 @@ router.get('/user/:id/expire', async function(req, res){
// Now remove from mailing list
try {
// eslint-disable-next-line no-unused-vars
await notif.remove(user.email, sendmail=sendmail);
await notif.remove(user.email, sendmail);
await plgsrv.run_plugins('deactivate', user.uid, user, session_user.uid);
res.send({message: 'Operation in progress', fid: fid, error: []});
res.end();
Expand Down Expand Up @@ -1938,9 +1938,8 @@ router.get('/user/:id/unlock', async function(req, res){
session_user.is_admin = isadmin;

if(session_user.is_admin){
let fid = new Date().getTime();
try {
await idsrv.user_unlock(user.uid)
await idsrv.user_unlock(user.uid);
} catch(err) {
res.send({message: 'Error during operation'});
res.end();
Expand Down

0 comments on commit 5a95af4

Please sign in to comment.