Skip to content

Commit 772c080

Browse files
committed
Refactored :id routing
1 parent d0fb473 commit 772c080

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/routes/avatars.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,7 @@ router.get('/list', function(req, res) {
3131
return res.set('Content-Type', 'application/json').send(response);
3232
});
3333

34-
router.get('/:id', function(req, res, next) {
35-
return combine(req.faceParts, false, function(err, stdout) {
36-
return common.sendImage(err, stdout, req, res, next);
37-
});
38-
});
39-
40-
router.get('/:size/:id', function(req, res, next) {
34+
router.get('/:size?/:id', function(req, res, next) {
4135
return combine(req.faceParts, req.params.size, function(err, stdout) {
4236
return common.sendImage(err, stdout, req, res, next);
4337
});

0 commit comments

Comments
 (0)