fix linting errors
This commit is contained in:
parent
257b44ad23
commit
0c6246fe45
1 changed files with 8 additions and 10 deletions
|
@ -33,7 +33,7 @@ export function updateProject(req, res) {
|
|||
return res.status(403).send({ success: false, message: 'Session does not match owner of project.' });
|
||||
}
|
||||
if (req.body.updatedAt && moment(req.body.updatedAt) < moment(project.updatedAt)) {
|
||||
return res.status(409).send({ success: false, message: 'Attempted to save stale version of project.' })
|
||||
return res.status(409).send({ success: false, message: 'Attempted to save stale version of project.' });
|
||||
}
|
||||
Project.findByIdAndUpdate(req.params.project_id,
|
||||
{
|
||||
|
@ -109,13 +109,11 @@ export function getProjectsForUser(req, res) {
|
|||
User.findOne({ username: req.params.username }, (err, user) => {
|
||||
if (!user) {
|
||||
return res.status(404).json({ message: 'User with that username does not exist.' });
|
||||
} else {
|
||||
}
|
||||
Project.find({ user: user._id }) // eslint-disable-line no-underscore-dangle
|
||||
.sort('-createdAt')
|
||||
.select('name files id createdAt updatedAt')
|
||||
.exec((err, projects) => res.json(projects));
|
||||
}
|
||||
return null;
|
||||
});
|
||||
} else {
|
||||
// could just move this to client side
|
||||
|
@ -132,7 +130,7 @@ function buildZip(project, req, res) {
|
|||
const projectName = project.name;
|
||||
let numCompletedFiles = 0;
|
||||
|
||||
zip.on('error', function (err) {
|
||||
zip.on('error', (err) => {
|
||||
res.status(500).send({ error: err.message });
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue