Skip to content
This repository was archived by the owner on Oct 13, 2025. It is now read-only.

Commit 36a8fbd

Browse files
Cleans up some linting issues
1 parent b901b15 commit 36a8fbd

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/routes/cache.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ function routes(app) {
2323

2424
// clear a unique route
2525
router.get('/clear/single/*', (req, res) => {
26-
let target = decodeURIComponent(req.params[0]);
26+
let target = decodeURIComponent(req.params[0]);
2727
// Formated options following ?
2828
const query = req.query;
2929
const hasQueryString = (query && (Object.keys(query).length !== 0));
3030

3131
// Target should always be defined as Express router raises 404
3232
// as route is not handled
33-
if (!!target) {
33+
if (target.length) {
3434
if (hasQueryString) {
3535
// Keep queries in a single string with the taget
3636
target = decodeURIComponent(req.url.split('/').slice(3).join('/'));
@@ -68,18 +68,18 @@ function routes(app) {
6868

6969
}
7070
});
71-
}else{
72-
res.status(HTTP_NOT_FOUND).end()
71+
} else {
72+
res.status(HTTP_NOT_FOUND).end();
7373
}
7474
});
7575

7676
// clear a group
7777
router.get('/clear/group/*', (req, res) => {
78-
let target = decodeURIComponent(req.params[0]);
78+
let target = decodeURIComponent(req.params[0]);
7979

8080
// Target should always be defined as Express router raises 404
8181
// as route is not handled
82-
if (!!target) {
82+
if (target.length) {
8383
target = 'group-' + target;
8484
// Returns elements of the list associated to the target/key 0 being the
8585
// first and -1 specifying get all till the latest
@@ -113,8 +113,8 @@ function routes(app) {
113113
}
114114
}
115115
});
116-
}else{
117-
res.status(HTTP_NOT_FOUND).end()
116+
} else {
117+
res.status(HTTP_NOT_FOUND).end();
118118
}
119119
});
120120

0 commit comments

Comments
 (0)