Skip to content

Commit d339fbf

Browse files
committed
support deleting paths
1 parent f0b23c2 commit d339fbf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/routes/bins/delete.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
const debug = require("debug")("mockbin");
22

33
module.exports = function (req, res, next) {
4-
this.client.del(`bin:${req.params.uuid}`, (err) => {
4+
const compoundId = req.params.uuid + req.params[0];
5+
this.client.del(`bin:${compoundId}`, (err) => {
56
if (err) {
67
debug(err);
78

@@ -10,7 +11,7 @@ module.exports = function (req, res, next) {
1011
next();
1112
});
1213

13-
this.client.del(`log:${req.params.uuid}`, (err) => {
14+
this.client.del(`log:${compoundId}`, (err) => {
1415
if (err) {
1516
debug(err);
1617

0 commit comments

Comments
 (0)