impulse-api 3.0.5 → 3.0.6

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.
Files changed (2) hide show
  1. package/package.json +1 -2
  2. package/src/server.js +4 -6
package/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "test": "nyc --reporter=lcov --reporter=text-summary mocha",
13
13
  "test-server": "node ./test/integration/test-server.js"
14
14
  },
15
- "version": "3.0.5",
15
+ "version": "3.0.6",
16
16
  "engines": {
17
17
  "node": ">=22"
18
18
  },
@@ -25,7 +25,6 @@
25
25
  "jsonwebtoken": "8.5.1",
26
26
  "lodash": "4.17.21",
27
27
  "morgan": "1.10.0",
28
- "multer": "1.4.5-lts.2",
29
28
  "path-to-regexp": "0.1.12"
30
29
  },
31
30
  "devDependencies": {
package/src/server.js CHANGED
@@ -1,6 +1,5 @@
1
1
  const fs = require('fs');
2
2
  const express = require('express');
3
- const multer = require('multer');
4
3
  const cors = require('cors');
5
4
  const morgan = require('morgan');
6
5
  const pathToRegexp = require('path-to-regexp');
@@ -475,11 +474,10 @@ class Server {
475
474
  method = route.method.toLowerCase();
476
475
  verb = (verbMap[method]) ? verbMap[method] : method;
477
476
 
478
- if (verb === 'post' || verb === 'patch' || verb === 'put') {
479
- this.http[verb](route.endpoint, multer().none(), this.preprocessor.bind(this, route));
480
- } else {
481
- this.http[verb](route.endpoint, this.preprocessor.bind(this, route));
482
- }
477
+ // express-fileupload handles multipart/form-data (including files)
478
+ // express.json() handles JSON bodies
479
+ // multer().none() is not needed and conflicts with file uploads
480
+ this.http[verb](route.endpoint, this.preprocessor.bind(this, route));
483
481
 
484
482
  });
485
483
  });