Skip to content

Commit 19818d7

Browse files
authored
refactor: linter fixes
1 parent 1e5dceb commit 19818d7

File tree

6 files changed

+30
-30
lines changed

6 files changed

+30
-30
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = function (req, res) {
2-
res.json({
3-
anyMethod: req.method
4-
});
5-
}
2+
res.json({
3+
anyMethod: req.method
4+
});
5+
};

test/mocks/users/PATCH.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
module.exports = function (req, res, next) {
2-
var data = "";
3-
req.on('data', function(chunk){ data += chunk})
4-
req.on('end', function(){
2+
let data = '';
3+
req.on('data', (chunk) => { data += chunk; });
4+
req.on('end', () => {
55
req.rawBody = data;
66
res.json({
77
requestString: data
88
});
99

1010
next();
11-
})
12-
}
11+
});
12+
};

test/mocks/users/POST.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = function (req, res) {
2-
res.status(201).json({
3-
name: req.body.name
4-
});
5-
}
2+
res.status(201).json({
3+
name: req.body.name
4+
});
5+
};
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = function (req, res) {
2-
res.json({
3-
id: req.params.user_id,
4-
method: 'GET'
5-
});
6-
}
2+
res.json({
3+
id: req.params.user_id,
4+
method: 'GET'
5+
});
6+
};
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = function (req, res) {
2-
res.json({
3-
id: req.params.user_id,
4-
method: 'GET',
5-
version: 1
6-
});
7-
}
2+
res.json({
3+
id: req.params.user_id,
4+
method: 'GET',
5+
version: 1
6+
});
7+
};
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = function (req, res) {
2-
res.json({
3-
id: req.params.user_id,
4-
method: 'GET',
5-
version: 2
6-
});
7-
}
2+
res.json({
3+
id: req.params.user_id,
4+
method: 'GET',
5+
version: 2
6+
});
7+
};

0 commit comments

Comments
 (0)