badmfck-api-server 1.7.1 → 1.7.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -60,7 +60,9 @@ class BaseEndpoint {
60
60
  async execute(req) {
61
61
  if (this.endpoints && this.endpoints.length > 0) {
62
62
  for (let i of this.endpoints) {
63
- if (BaseEndpoint.entrypoint + i.endpoint === req.endpoint && i.handler && typeof i.handler === "function")
63
+ let targetEP = BaseEndpoint.entrypoint + i.endpoint;
64
+ targetEP = targetEP.replaceAll("//", "/");
65
+ if (targetEP === req.endpoint && i.handler && typeof i.handler === "function")
64
66
  return i.handler.call(this, req);
65
67
  }
66
68
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "badmfck-api-server",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
4
4
  "description": "Simple API http server based on express",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",