@tahminator/sapling 1.3.2 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -49,6 +49,10 @@ export function Controller({ prefix = "", deps = [] } = {
49
49
  const methodName = methodResolve[method];
50
50
  router[methodName](fp, (request, response, next) => __awaiter(this, void 0, void 0, function* () {
51
51
  const result = yield fn.bind(controllerInstance)(request, response, next);
52
+ // Middleware (USE) should not send responses, just call next()
53
+ if (method === "USE") {
54
+ return;
55
+ }
52
56
  if (result instanceof ResponseEntity) {
53
57
  response
54
58
  .contentType("application/json")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tahminator/sapling",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "description": "A library to help you write cleaner Express.js code",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",